diff options
author | 2021-03-30 16:53:03 +0800 | |
---|---|---|
committer | 2021-03-30 16:53:03 +0800 | |
commit | 581b83641ff0ecd114d87a8b7eab04f81fd2e7f5 (patch) | |
tree | 6fc82a5fee88fa0c856266d8fd982a66e7e96df2 /tests/LTP/agl_test_ltp_base.py | |
parent | 5386506f863cc951f618f622d61adf93596eb6a0 (diff) |
agl-test-framework: add LTP syscalls tests into framework
syscalls in LTP version 20220121 contains some bugs, those have
been adjusted in order to provide trustable test reports.
Bug-AGL: SPEC-4345
Signed-off-by: yanxk <yanxk.fnst@fujitsu.com>
Change-Id: I41aba8e64e9b916066f9a60ffac863ffdbabbf47
Diffstat (limited to 'tests/LTP/agl_test_ltp_base.py')
-rw-r--r-- | tests/LTP/agl_test_ltp_base.py | 16 |
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) |