diff options
author | 2023-04-19 13:52:06 +0800 | |
---|---|---|
committer | 2023-04-26 03:01:35 +0000 | |
commit | dd6a670eef2a3175a22831b503f71d5afcea063e (patch) | |
tree | 285a08f52c9a160103a31e64d0ed6f741761953e /tests/LTP/cve/run_tests.py | |
parent | 8f83b67b8ac0a60ff4e3a5a5888474b3033f9b3a (diff) |
tests: add precheck func for test suites under LTP
Add precheck func for test suites under LTP. Ensure that the test
suites could be skipped if the test conditions are not met.
Bug-AGL: SPEC-4755
Signed-off-by: duerpei <duep.fnst@fujitsu.com>
Change-Id: Ib605a2109d04dd4f8544ef9a10f63c172489e827
Diffstat (limited to 'tests/LTP/cve/run_tests.py')
-rw-r--r-- | tests/LTP/cve/run_tests.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/LTP/cve/run_tests.py b/tests/LTP/cve/run_tests.py index f8e864f..8ed99e5 100644 --- a/tests/LTP/cve/run_tests.py +++ b/tests/LTP/cve/run_tests.py @@ -21,6 +21,8 @@ class CveBase(LTPBase): os.environ['KCONFIG_SKIP_CHECK'] = "True" instance = CveBase() +skip_msg = "The current environment does not match the test requirements." +pytestmark = pytest.mark.skipif(instance.precheck() == False, reason = skip_msg) test_case_list = instance.get_test_case_list() @pytest.fixture(scope='module') |