summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/glib2/run_tests.py40
1 files changed, 6 insertions, 34 deletions
diff --git a/tests/glib2/run_tests.py b/tests/glib2/run_tests.py
index ce45df9..dfc23ae 100644
--- a/tests/glib2/run_tests.py
+++ b/tests/glib2/run_tests.py
@@ -13,46 +13,18 @@ class GLIB2Base(PTESTBase):
self.case_info_list = log.log_process_gnome_desktop_testing(log_file)
self.init_case_status()
+instance = GLIB2Base()
+instance.run_ptest()
+
@pytest.fixture(scope='module')
def testbase():
- #init instance for test
- instance = GLIB2Base()
- #run test scripts
- #the "test_name" should be the name of test set in ptest
- instance.run_test_fun()
- #parser log
- instance.log_process()
-
yield instance
-
#package log files and make report file
instance.log_report()
-def setup_module(testbase: GLIB2Base):
- print("setup function start")
-
-def precheck():
- instance = GLIB2Base()
- return instance.precheck()
-skip_msg = "The current environment does not match the test requirements."
-pytestmark = pytest.mark.skipif(precheck() == False, reason = skip_msg)
-
-@pytest.mark.oss_default
-def test_timeloop_closure(testbase: GLIB2Base):
- name = "glib/timeloop-closure.test"
- testbase.run_case(name)
-
-@pytest.mark.oss_default
-def test_contenttype(testbase: GLIB2Base):
- name = "glib/contenttype.test"
- testbase.run_case(name)
-
-@pytest.mark.oss_default
-def test_string(testbase: GLIB2Base):
- name = "glib/string.test"
- testbase.run_case(name)
-
-#TODO:Completion test cases
+@pytest.mark.parametrize('case_name', instance.case_info_list.keys())
+def test_glib2(testbase: GLIB2Base, case_name):
+ testbase.run_case(case_name)
if __name__ == '__main__':
pytest.main("-s run_tests")