diff options
author | Qiu Tingting <qiutt@fujitsu.com> | 2022-07-24 16:17:13 +0800 |
---|---|---|
committer | Qiu Tingting <qiutt@fujitsu.com> | 2022-07-24 16:32:14 +0800 |
commit | 96f6fed2eba4ddaa6912a5cdba41e80a91e47115 (patch) | |
tree | ac5d504888d0e40460d9519777b023a15cf45169 /tests/expat/run_tests.py | |
parent | 3c200f4ea6721f07de8d728056e4381ddd2eec6b (diff) |
Add precheck() fun
Checking env before run testsuite is necessary.
1. Add common check in agl_test_base.py.
It is currently an empty function.
If necessary, common check sould be added.
2. Add ptest common check in agl_test_ptest_base.py.
For ptest testsuite, check whether ptest-runner and run-ptest script exist.
3. Add special check in run_tests.py.
For aio-stress testsuite, check whether compiled aio-stress script exists
For bzip2 testsuite, check whether bzip2 cmd exists.
Bug-AGL: SPEC-4345
Signed-off-by: Qiu Tingting <qiutt@fujitsu.com>
Change-Id: Id7841c0337465266dd607403ecb3e1c4377c6198
Diffstat (limited to 'tests/expat/run_tests.py')
-rw-r--r-- | tests/expat/run_tests.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/expat/run_tests.py b/tests/expat/run_tests.py index aef92a7..43014d1 100644 --- a/tests/expat/run_tests.py +++ b/tests/expat/run_tests.py @@ -29,6 +29,12 @@ def testbase(): def setup_module(testbase: EXPATBase): print("setup function start") +def precheck(): + instance = EXPATBase() + return instance.precheck() +skip_msg = "The current environment does not match the test requirements." +pytestmark = pytest.mark.skipif(precheck() == False, reason = skip_msg) + def test_runtests_test_accounting_precision(testbase: EXPATBase): name = "runtests_test_accounting_precision" testbase.run_case(name) |