aboutsummaryrefslogtreecommitdiffstats
path: root/agl-test
diff options
context:
space:
mode:
authoryanxk <yanxk.fnst@fujitsu.com>2022-09-03 16:24:32 +0800
committerXinkuan Yan <yanxk.fnst@fujitsu.com>2022-12-02 00:56:09 +0000
commit85e3c12681faca0519ca995a82feeb7709397ca2 (patch)
treeff4cff2addafab155353175e45b61e50a1840e52 /agl-test
parentef29f9077a89038525e20a517d972453f2cc4d62 (diff)
agl-test-framework: add test 'crashme'
'agl-test' modified, now, usr would not run dangerous tests like this 'crashme' unless they do self selection by '-m' pytest option. Set default to 'not dangerous'. a new marker 'dangerous' has been add to the pytest.ini. add new method into the agl_test_base.py, to help get path of the 'spec.json', this file help stress tests like 'crashme' to run under different stress levels. for run_tests.py, modifications focus on how to run 'crashme' under that different levels. new marker 'order' would always ensure this 'crashme' test to be placed as the so called 'last' test of all. Bug-AGL: SPEC-4345 Signed-off-by: yanxk <yanxk.fnst@fujitsu.com> Change-Id: Icb36d7c5c52430d89787f4373a2852b1b03ec8a6
Diffstat (limited to 'agl-test')
-rwxr-xr-xagl-test18
1 files changed, 17 insertions, 1 deletions
diff --git a/agl-test b/agl-test
index 569784f..992fc8a 100755
--- a/agl-test
+++ b/agl-test
@@ -1,3 +1,19 @@
#!/bin/sh
+
cd /usr/AGL/agl-test/
-exec pytest "$@"
+
+# 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
+ exec pytest "$@"
+else
+ exec pytest "$@" -m "not dangerous"
+fi