diff options
author | 2022-09-22 15:11:02 +0800 | |
---|---|---|
committer | 2023-01-03 09:20:43 +0000 | |
commit | 65b57dc02df59e251cba2e94eff44173fa34b14c (patch) | |
tree | e5120581d1d24921f96554bcfc9e0d3f779453e7 /tests/python3/run_tests.py | |
parent | 5d580b48ba3fc26735f7858461a47a7347baceec (diff) |
agl-test-framework: enable ptest of python3
Add test scripts for enabling ptest of python3.
This test will cost 1h50min time in raspberrypi4.
Bug-AGL: SPEC-4345
Signed-off-by: Qiu Tingting <qiutt@fujitsu.com>
Change-Id: I840f4fa3e2d457f87260ec79fc72a06327157f22
Diffstat (limited to 'tests/python3/run_tests.py')
-rw-r--r-- | tests/python3/run_tests.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/python3/run_tests.py b/tests/python3/run_tests.py new file mode 100644 index 0000000..63b1a77 --- /dev/null +++ b/tests/python3/run_tests.py @@ -0,0 +1,30 @@ +import pytest + +import tests.python3.parser as parser + +from plugins.agl_test_ptest_base import PTESTBase + +class Python3Base(PTESTBase): + def __init__(self): + super().__init__(test_name="python3") + + def log_process(self): + log_file = self.get_logfile() + self.case_info_list = parser.log_parse(log_file) + self.init_case_status() + +instance = Python3Base() +instance.run_ptest() + +@pytest.fixture(scope='module') +def testbase(): + yield instance + #package log files and make report file + instance.log_report() + +@pytest.mark.parametrize('case_name', instance.case_info_list.keys()) +def test_python3(testbase: Python3Base, case_name): + testbase.run_case(case_name) + +if __name__ == '__main__': + pytest.main("-s run_tests") |