From dd6a670eef2a3175a22831b503f71d5afcea063e Mon Sep 17 00:00:00 2001 From: duerpei Date: Wed, 19 Apr 2023 13:52:06 +0800 Subject: 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 Change-Id: Ib605a2109d04dd4f8544ef9a10f63c172489e827 --- tests/LTP/math/run_tests.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/LTP/math/run_tests.py') diff --git a/tests/LTP/math/run_tests.py b/tests/LTP/math/run_tests.py index 9f82915..e288534 100644 --- a/tests/LTP/math/run_tests.py +++ b/tests/LTP/math/run_tests.py @@ -7,6 +7,8 @@ class MathBase(LTPBase): super().__init__(test_name="math") instance = MathBase() +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') -- cgit 1.2.3-korg