summaryrefslogtreecommitdiffstats
path: root/agl-test
blob: 1d2909ab43499c3fc2b9eb1f75c5a9625d6228ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh

# set time stamp
current_time=`date +%Y_%m_%d_%H_%M_%S`
export TIME_STAMP=${current_time}

# init file of test list
test_list_file=test_list_${current_time}.json
mkdir -p /var/run/agl-test/logs/tmp-log/
echo "{ }" > /var/run/agl-test/logs/tmp-log/${test_list_file}

# init the dir of log-to-report
if [[ -e "/var/run/agl-test/logs/log-to-report/summary-report.html" ]]
then
	rm /var/run/agl-test/logs/log-to-report/*
else
	mkdir -p /var/run/agl-test/logs/log-to-report/
fi

cd /usr/AGL/agl-test/

# default stress level is low
if [[ ! $STRESS_LEVEL ]]
then
        export STRESS_LEVEL="low"
fi
echo "STRESS_LEVEL: $STRESS_LEVEL"

# default test without dangerous marker
moption="-m "
if [[ $* =~ ${moption} ]]
then
        pytest "$@"
else
        pytest "$@" -m "not dangerous"
fi

python3 -c "import plugins.agl_test_report as report; report.generate_total_summary_files('${current_time}')"