diff options
author | Yan <yanxk.fnst@fujitsu.com> | 2023-04-03 13:43:55 +0800 |
---|---|---|
committer | Yan <yanxk.fnst@fujitsu.com> | 2023-04-03 13:43:55 +0800 |
commit | fbae7ac31fd2a895f74c4c57508662eec15f40c1 (patch) | |
tree | 0cdc6e69cc4d4228648d36ebd9c3ac78f701d8ae | |
parent | e0371eee986998087c4e75acb48039dcec2c6283 (diff) |
agl-test-framework: add ptest json-glib
add json-glib ptest into agl-test-framework.
Bug-AGL: SPEC-4733
Signed-off-by: Yan <yanxk.fnst@fujitsu.com>
Change-Id: I03ef4122fbef0c6cee3eec5e5d23915698b35e51
-rw-r--r-- | tests/json_glib/__init__.py | 1 | ||||
-rw-r--r-- | tests/json_glib/run_tests.py | 29 |
2 files changed, 30 insertions, 0 deletions
diff --git a/tests/json_glib/__init__.py b/tests/json_glib/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/tests/json_glib/__init__.py @@ -0,0 +1 @@ + diff --git a/tests/json_glib/run_tests.py b/tests/json_glib/run_tests.py new file mode 100644 index 0000000..9b32af5 --- /dev/null +++ b/tests/json_glib/run_tests.py @@ -0,0 +1,29 @@ +import pytest + +import plugins.agl_test_log as log + +from plugins.agl_test_ptest_base import PTESTBase + +class JsonGlibBase(PTESTBase): + def __init__(self): + super().__init__(test_name="json-glib") + + def log_process(self): + log_file = self.get_logfile() + self.case_info_list = log.log_process_gnome_desktop_testing(log_file) + +instance = JsonGlibBase() +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_json_glib(testbase: JsonGlibBase, case_name): + testbase.run_case(case_name) + +if __name__ == '__main__': + pytest.main("-s run_tests") |