aboutsummaryrefslogtreecommitdiffstats
path: root/tests/LTP/math/run_tests.py
diff options
context:
space:
mode:
authorduerpei <duep.fnst@fujitsu.com>2023-04-19 13:52:06 +0800
committerQiu Tingting <qiutt@fujitsu.com>2023-04-26 03:01:35 +0000
commitdd6a670eef2a3175a22831b503f71d5afcea063e (patch)
tree285a08f52c9a160103a31e64d0ed6f741761953e /tests/LTP/math/run_tests.py
parent8f83b67b8ac0a60ff4e3a5a5888474b3033f9b3a (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/math/run_tests.py')
-rw-r--r--tests/LTP/math/run_tests.py2
1 files changed, 2 insertions, 0 deletions
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')