blob: 3c5dd9c08b826837658942a1f0fd9faac29cb250 (
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
#!/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 logging mode is slim
if [[ ! $LOG_MODE ]]
then
export LOG_MODE="slim"
fi
case $LOG_MODE in
"origin")
;;
"slim")
;;
"clear")
;;
*)
echo "Unrecognized LOG_MODE, setting to default mode 'slim'..."
export LOG_MODE="slim"
;;
esac
echo "LOG_MODE: $LOG_MODE"
# 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}')"
python3 -c "import plugins.agl_test_utils as utils; utils.rm_all_tmp()"
|