aboutsummaryrefslogtreecommitdiffstats
path: root/tests/LTP/agl_test_ltp_base.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/LTP/agl_test_ltp_base.py')
-rw-r--r--tests/LTP/agl_test_ltp_base.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/LTP/agl_test_ltp_base.py b/tests/LTP/agl_test_ltp_base.py
index f8bd708..44d5325 100644
--- a/tests/LTP/agl_test_ltp_base.py
+++ b/tests/LTP/agl_test_ltp_base.py
@@ -49,10 +49,19 @@ class LTPBase(AGLBaseTest):
test_cases.close()
return case_list
+ def get_skip_file_path(self):
+ path = self.get_log_path() + self.test_name + ".skip"
+ return path
+
+ def has_skip_file(self):
+ path = self.get_skip_file_path()
+ pathObj_skipfile = pathlib.Path(path)
+ return pathObj_skipfile.is_file()
+
#Run test by runltp
def run_test_fun(self, case_name):
tmp_log_dir = self.get_log_path()
- run_test_cmd = self.RUNLTP + \
+ run_test_cmd_basic = self.RUNLTP + \
" -f " + self.test_name + \
" -s "+ "^" + case_name + "\\\\b" + \
" -p " + \
@@ -63,6 +72,11 @@ class LTPBase(AGLBaseTest):
console_log = tmp_log_dir + self.test_name + ".console"
+ if not self.has_skip_file():
+ run_test_cmd = run_test_cmd_basic
+ else:
+ run_test_cmd = run_test_cmd_basic + " -S " + self.get_skip_file_path()
+
with open(console_log, 'a') as consolelog:
subprocess.run(run_test_cmd, shell = True, stdout = consolelog,
stderr = consolelog)