diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/LTP/agl_test_ltp_base.py | 6 | ||||
-rw-r--r-- | tests/LTP/posix_conformance_tests/run_tests.py | 8 | ||||
-rw-r--r-- | tests/aio_stress/run_tests.py | 9 | ||||
-rw-r--r-- | tests/crashme/run_tests.py | 9 | ||||
-rw-r--r-- | tests/linus_stress/run_tests.py | 9 | ||||
-rw-r--r-- | tests/stress_ng/run_tests.py | 8 |
6 files changed, 44 insertions, 5 deletions
diff --git a/tests/LTP/agl_test_ltp_base.py b/tests/LTP/agl_test_ltp_base.py index 44d5325..982e60d 100644 --- a/tests/LTP/agl_test_ltp_base.py +++ b/tests/LTP/agl_test_ltp_base.py @@ -109,6 +109,10 @@ class LTPBase(AGLBaseTest): test_file = pathlib.Path(self.LTPTEST + self.test_name) check_test_file = test_file.is_file() + if((check_common and check_runltp_script and check_test_file) == False): + #write test suite info to file + self.write_skip_info() + return check_common and check_runltp_script and check_test_file def log_process(self): @@ -146,4 +150,6 @@ class LTPBase(AGLBaseTest): def run_ltp_test(self, case_name): if(self.precheck() == True): self.run_test_fun(case_name) + #write test suite info to file + self.write_run_info() self.log_process() diff --git a/tests/LTP/posix_conformance_tests/run_tests.py b/tests/LTP/posix_conformance_tests/run_tests.py index 5806fca..9d8405d 100644 --- a/tests/LTP/posix_conformance_tests/run_tests.py +++ b/tests/LTP/posix_conformance_tests/run_tests.py @@ -88,6 +88,8 @@ def testbase(): instance = Conformance_Base() # run all cases instance.run_all_tests() + #write test suite info to file + instance.write_run_info() # do log process instance.log_process() yield instance @@ -96,7 +98,11 @@ def testbase(): def local_precheck(): checker = Conformance_Base() - return checker.precheck() + output = checker.precheck() + if(output == False): + #write test suite info to file + instance.write_skip_info() + return output skip_msg = "The current environment does not match the test requirements." pytestmark = pytest.mark.skipif(local_precheck() == False, reason = skip_msg) diff --git a/tests/aio_stress/run_tests.py b/tests/aio_stress/run_tests.py index e7e8b5c..85a3515 100644 --- a/tests/aio_stress/run_tests.py +++ b/tests/aio_stress/run_tests.py @@ -39,6 +39,8 @@ def testbase(): instance = AIOBase() #run test scripts instance.run_test_fun() + #write test suite info to file + instance.write_run_info() yield instance @@ -50,7 +52,12 @@ def setup_module(testbase: AIOBase): def precheck(): instance = AIOBase() - return instance.precheck() + output = instance.precheck() + if(output == False): + #write test suite info to file + instance.write_skip_info() + return output + skip_msg = "The current environment does not match the test requirements." pytestmark = pytest.mark.skipif(precheck() == False, reason = skip_msg) diff --git a/tests/crashme/run_tests.py b/tests/crashme/run_tests.py index ccb4775..bedd0e4 100644 --- a/tests/crashme/run_tests.py +++ b/tests/crashme/run_tests.py @@ -105,6 +105,9 @@ def testbase(): #run test scripts instance.run_test_fun() + #write test suite info to file + instance.write_run_info() + yield instance #package log files and make report file @@ -112,7 +115,11 @@ def testbase(): def precheck(): instance = CrashmeBase() - return instance.precheck() + output = instance.precheck() + if(output == False): + #write test suite info to file + instance.write_skip_info() + return output skip_msg = "The current environment does not match the test requirements." pytestmark = pytest.mark.skipif(precheck() == False, reason = skip_msg) diff --git a/tests/linus_stress/run_tests.py b/tests/linus_stress/run_tests.py index df3157b..22e67e8 100644 --- a/tests/linus_stress/run_tests.py +++ b/tests/linus_stress/run_tests.py @@ -43,12 +43,19 @@ def testbase(): def precheck(): instance = LinusStressBase() - return instance.precheck() + output = instance.precheck() + if(output == False): + #write test suite info to file + instance.write_skip_info() + return output + skip_msg = "The current environment does not match the test requirements." pytestmark = pytest.mark.skipif(precheck() == False, reason = skip_msg) def test_linus_stress(testbase: LinusStressBase): testbase.run_test_fun() + #write test suite info to file + testbase.write_run_info() assert testbase.case_info_list['test_linus_stress'][2] == 'passed' if __name__ == '__main__': diff --git a/tests/stress_ng/run_tests.py b/tests/stress_ng/run_tests.py index ec6822b..22ca5c5 100644 --- a/tests/stress_ng/run_tests.py +++ b/tests/stress_ng/run_tests.py @@ -35,6 +35,8 @@ def testbase(): instance = StressngBase() #run test scripts instance.run_test_fun() + #write test suite info to file + instance.write_run_info() yield instance @@ -43,7 +45,11 @@ def testbase(): def precheck(): instance = StressngBase() - return instance.precheck() + output = instance.precheck() + if(output == False): + #write test suite info to file + instance.write_skip_info() + return output skip_msg = "The current environment does not match the test requirements." pytestmark = pytest.mark.skipif(precheck() == False, reason = skip_msg) |