summaryrefslogtreecommitdiffstats
path: root/glib2/rootfs-scripts/run_tests.py
diff options
context:
space:
mode:
authorduerpei <duep.fnst@fujitsu.com>2022-06-29 16:05:12 +0800
committerduerpei <duep.fnst@fujitsu.com>2022-06-29 16:05:12 +0800
commitfe92db3b3f0b4b1e7bed9abe2ef376ef457e1a4c (patch)
tree7bf82741f079921eed9232ffb3c6ad9d15889621 /glib2/rootfs-scripts/run_tests.py
parentdaed111bea534c63ed6906e8e0c1b5578e324838 (diff)
qa-test-misc: delete glib2 and rpm
Due to the adjustment of the framework, the scripts running the test set are moved to 'agl-test-framework', so they are deleted from 'qa-test-misc' According to the previous discussion, rpm will use its ptest, so rpm also be deleted. Bug-AGL: SPEC-4345 Signed-off-by: duerpei <duep.fnst@fujitsu.com> Change-Id: Ib5fb19f410a63d3f68d83714a41dc1beeb053d45
Diffstat (limited to 'glib2/rootfs-scripts/run_tests.py')
-rw-r--r--glib2/rootfs-scripts/run_tests.py56
1 files changed, 0 insertions, 56 deletions
diff --git a/glib2/rootfs-scripts/run_tests.py b/glib2/rootfs-scripts/run_tests.py
deleted file mode 100644
index 2387b95..0000000
--- a/glib2/rootfs-scripts/run_tests.py
+++ /dev/null
@@ -1,56 +0,0 @@
-import pytest
-import subprocess
-
-import plugins.agl_test_conf as agl_test_conf
-import plugins.agl_test_utils as agl_test_utils
-
-import glib2.parser as parser
-import glib2.report as report
-
-TMP_LOGS_DIR = agl_test_conf.TMP_LOGS_DIR
-
-THIS_TEST = "glib2"
-test_cases_values_and_status = []
-
-def setup_module():
- agl_test_utils.create_dir(THIS_TEST)
- run_test_fun()
- global test_cases_values_and_status
- test_cases_values_and_status = parser.log_process(TMP_LOGS_DIR,THIS_TEST)
-
-#Run test, and redirect the log into the file of THIS_TEST.log under TMP_LOGS_DIR/THIS_TEST/
-def run_test_fun():
- log_file = agl_test_conf.get_log_file(THIS_TEST)
- with open(log_file,'w') as log_f:
- subprocess.run(['ptest-runner','glib-2.0'],stdout=log_f,stderr=log_f)
- log_f.close()
-
-def check_status(test_name):
- global test_cases_values_and_status
- for item in test_cases_values_and_status:
- if(item[0]==test_name):
- if(item[1] == "PASS"):
- item[2] = "passed"
- return 1
- if(item[1] == "FAIL"):
- item[2] = "failed"
- return 0
-
-def test_glib2_gdbus_names():
- assert check_status("glib/gdbus-names.test")
-
-def test_glib2_rand():
- assert check_status("glib/rand.test")
-
-def test_glib2_base64():
- assert check_status("glib/base64.test")
-
-#TODO
-#Complete all test cases
-
-#Pack the log file and count the test results
-def teardown_module():
- report.log_report(test_cases_values_and_status,THIS_TEST)
-
-if __name__ == '__main__':
- pytest.main("run_tests")