From fb969436af3ebbdc81c15b23ad8b1ef37a8c2694 Mon Sep 17 00:00:00 2001 From: duerpei Date: Wed, 12 Jul 2023 04:58:50 +0800 Subject: agl-test-framework: replace "-" with "_" Replace "-" with "_" in the name of the directory to solve the following errors when running agl-test: import file mismatch: imported module 'run_tests' has this __file__ attribute: /usr/AGL/agl-test/tests/aio-stress/run_tests.py which is not the same as the test file we want to collect: /usr/AGL/agl-test/tests/gdk-pixbuf/run_tests.py HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules Bug-AGL: SPEC-4345 Signed-off-by: duerpei Change-Id: Id8028dfbda618a9b7858602d3832bf2eb7f7ef5e --- plugins/agl_test_base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/agl_test_base.py') diff --git a/plugins/agl_test_base.py b/plugins/agl_test_base.py index a6bcff9..3a0bab4 100644 --- a/plugins/agl_test_base.py +++ b/plugins/agl_test_base.py @@ -27,10 +27,10 @@ class AGLBaseTest: return conf.get_log_file(self.name) def get_workdir(self): - return conf.WORK_DIR + self.name + "/resource/" + return conf.WORK_DIR + self.name.replace('-','_') + "/resource/" def get_spec_path(self): - return conf.WORK_DIR + self.name + "/spec.json" + return conf.WORK_DIR + self.name.replace('-','_') + "/spec.json" def append_one_caseinfo(name, value, status): self.case_info_list[name] = [name, value, status] -- cgit