From 17a4f7052c4863baa8001ff8867a78e2c81beb39 Mon Sep 17 00:00:00 2001 From: duerpei Date: Fri, 14 Oct 2022 17:13:47 +0800 Subject: agl-test-framework: add script for ltp/cve Add run_test.py script for the test suite of ltp/cve, the script used the class of LTPBase. Bug-AGL: SPEC-4345 Signed-off-by: duerpei Change-Id: I4eb27c18f1b49f51308f531b687c46f736461f5e --- tests/LTP/cve/run_tests.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/LTP/cve/run_tests.py (limited to 'tests/LTP/cve/run_tests.py') diff --git a/tests/LTP/cve/run_tests.py b/tests/LTP/cve/run_tests.py new file mode 100644 index 0000000..cbe86fd --- /dev/null +++ b/tests/LTP/cve/run_tests.py @@ -0,0 +1,24 @@ +import pytest + +from tests.LTP.agl_test_ltp_base import LTPBase + +class CveBase(LTPBase): + def __init__(self): + super().__init__(test_name="cve") + +instance = CveBase() +test_case_list = instance.get_test_case_list() + +@pytest.fixture(scope='module') +def testbase(): + yield instance + #package log files and make report file + instance.log_report() + +@pytest.mark.parametrize('case_name', test_case_list) +def test_ltp_cve(testbase: CveBase, case_name): + testbase.run_ltp_test(case_name) + testbase.run_case(case_name) + +if __name__ == '__main__': + pytest.main("-s run_tests") -- cgit