diff options
author | 2022-08-14 11:49:05 +0800 | |
---|---|---|
committer | 2022-08-14 11:49:05 +0800 | |
commit | 4bc58fc5cc29a5deae8ede984ab8e68e7874f615 (patch) | |
tree | 06d92e1f36c4af4da169e36141bff0c607905e63 /tests/openssl/run_tests.py | |
parent | 4f19f467865cd3b6b49ce5c39502a031525cfc16 (diff) |
agl-test-framework: enable ptest of 'openssl'
Base on the agl-test-framework, the ptest results of 'openssl'
can now be collected, analyzed and then reported.
Here are 3 samples that the output result might look like:
tests/openssl/run_tests.py::test_openssl[30-test_evp_fetch_prov] PASSED
tests/openssl/run_tests.py::test_openssl[30-test_evp_kdf] PASSED
tests/openssl/run_tests.py::test_openssl[30-test_evp_libctx] PASSED
Bug-AGL: SPEC-4345
Signed-off-by: yanxk <yanxk.fnst@fujitsu.com>
Change-Id: Id28a36ce081e8cfb49dcb7af8db369244f1fd258
Diffstat (limited to 'tests/openssl/run_tests.py')
-rw-r--r-- | tests/openssl/run_tests.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/openssl/run_tests.py b/tests/openssl/run_tests.py new file mode 100644 index 0000000..f1a5177 --- /dev/null +++ b/tests/openssl/run_tests.py @@ -0,0 +1,30 @@ +import pytest + +import tests.openssl.parser as parser + +from plugins.agl_test_ptest_base import PTESTBase + +class OPENSSLBase(PTESTBase): + def __init__(self): + super().__init__(test_name="openssl") + + def log_process(self): + log_file = self.get_logfile() + self.case_info_list = parser.log_parse(log_file) + self.init_case_status() + +instance = OPENSSLBase() +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_openssl(testbase: OPENSSLBase, case_name): + testbase.run_case(case_name) + +if __name__ == '__main__': + pytest.main("-s run_tests") |