From 4bc58fc5cc29a5deae8ede984ab8e68e7874f615 Mon Sep 17 00:00:00 2001 From: yanxk Date: Sun, 14 Aug 2022 11:49:05 +0800 Subject: 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 Change-Id: Id28a36ce081e8cfb49dcb7af8db369244f1fd258 --- tests/openssl/run_tests.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 tests/openssl/run_tests.py (limited to 'tests/openssl/run_tests.py') 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") -- cgit