summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2017-10-18 07:22:05 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2017-10-18 07:22:05 +0000
commita4f727d733bf764a62a9f25ad51ef12db2ac8c86 (patch)
tree3bf534ac0cf781e6a28924d4550b68a447b7b7c8
parent0b2a4ed928ea0d0c83453be1b8ec541158daa2d9 (diff)
parent8e83218ec3beaaf630d812fb1dda90b5190a80d5 (diff)
downloadplatform_test_vts-testcase_kernel-oreo-mr1-cts-release.tar.gz
platform_test_vts-testcase_kernel-oreo-mr1-cts-release.tar.bz2
platform_test_vts-testcase_kernel-oreo-mr1-cts-release.zip
Change-Id: I2e0bfc2909d485649dca82291c13de6a0865ea27
-rw-r--r--ltp/KernelLtpTest.py10
-rw-r--r--ltp/configs/stable_tests.py11
-rw-r--r--ltp/test_case.py26
3 files changed, 10 insertions, 37 deletions
diff --git a/ltp/KernelLtpTest.py b/ltp/KernelLtpTest.py
index 3146ab5f..ccf8880b 100644
--- a/ltp/KernelLtpTest.py
+++ b/ltp/KernelLtpTest.py
@@ -400,8 +400,9 @@ class KernelLtpTest(base_test.BaseTestClass):
(True, test_case.note))
continue
- cmd = "export {envp} && {commands}".format(
- envp=self.GetEnvp(), commands=test_case.GetCommand())
+ cmd = "export {envp} && cd {cwd} && {commands}".format(
+ envp=self.GetEnvp(), cwd=ltp_configs.LTPBINPATH,
+ commands=test_case.command)
logging.info("Worker {} starts executing command "
"for '{}'.\n Command:{}".format(id, test_case, cmd))
@@ -454,8 +455,9 @@ class KernelLtpTest(base_test.BaseTestClass):
asserts.skipIf(test_case.is_filtered, test_case.note)
asserts.skipIf(not self._requirement.Check(test_case), test_case.note)
- cmd = "export {envp} && {commands}".format(
- envp=self.GetEnvp(), commands=test_case.GetCommand())
+ cmd = "export {envp} && cd {cwd} && {commands}".format(
+ envp=self.GetEnvp(), cwd=ltp_configs.LTPBINPATH,
+ commands=test_case.command)
logging.info("Executing %s", cmd)
self.CheckResult(self.shell.Execute(cmd))
diff --git a/ltp/configs/stable_tests.py b/ltp/configs/stable_tests.py
index c33da36c..fc918f48 100644
--- a/ltp/configs/stable_tests.py
+++ b/ltp/configs/stable_tests.py
@@ -193,7 +193,6 @@ STABLE_TESTS = [
'mm.page02_64bit',
'mm.stack_space_32bit',
'mm.stack_space_64bit',
- 'mm.thp01_32bit',
'mm.vma01_32bit',
'nptl.nptl01_32bit',
'nptl.nptl01_64bit',
@@ -230,12 +229,8 @@ STABLE_TESTS = [
'syscalls.accept01_64bit',
'syscalls.access01_32bit',
'syscalls.access01_64bit',
- 'syscalls.access02_32bit',
- 'syscalls.access02_64bit',
'syscalls.access03_32bit',
'syscalls.access03_64bit',
- 'syscalls.access04_32bit',
- 'syscalls.access04_64bit',
'syscalls.access05_32bit',
'syscalls.access05_64bit',
'syscalls.add_key01_32bit',
@@ -662,8 +657,6 @@ STABLE_TESTS = [
'syscalls.futimesat01_64bit',
'syscalls.get_robust_list01_32bit',
'syscalls.get_robust_list01_64bit',
- 'syscalls.getcwd01_32bit',
- 'syscalls.getcwd01_64bit',
'syscalls.getcwd04_32bit',
'syscalls.getcwd04_64bit',
'syscalls.getdents01_32bit',
@@ -1086,10 +1079,6 @@ STABLE_TESTS = [
'syscalls.preadv01_64bit',
'syscalls.preadv02_64_32bit',
'syscalls.preadv02_64_64bit',
- 'syscalls.pselect01_32bit',
- 'syscalls.pselect01_64_32bit',
- 'syscalls.pselect01_64_64bit',
- 'syscalls.pselect01_64bit',
'syscalls.pselect02_32bit',
'syscalls.pselect02_64_32bit',
'syscalls.pselect02_64_64bit',
diff --git a/ltp/test_case.py b/ltp/test_case.py
index 6862a3cf..85a9a94f 100644
--- a/ltp/test_case.py
+++ b/ltp/test_case.py
@@ -92,28 +92,10 @@ class TestCase(object):
"""Set the test case's name."""
self._testname = testname
- def InternalAddLtpPathToCommand(self, command):
- """Internal function to change binary in commands to their full path"""
- tokens = command.strip().split()
-
- # If not ltp executables:
- if (tokens[0] in ltp_configs.INTERNAL_BINS or
- tokens[0] in ltp_configs.INTERNAL_SHELL_COMMANDS or
- tokens[0].find('=') > 0):
- return command
- else: # Is Ltp executable
- tokens[0] = path_utils.JoinTargetPath(ltp_configs.LTPBINPATH,
- tokens[0])
- return ' '.join(tokens)
-
- def GetCommand(self):
- """Get test case's command.
-
- Get the test case's command where ltp test binary names have been
- replaced with their full paths
- """
- return '&&'.join((self.InternalAddLtpPathToCommand(command)
- for command in self._command.split('&&')))
+ @property
+ def command(self):
+ """Get the test case's command."""
+ return self._command
def InternalGetExecutableNames(self):
"""Get a generator of all required executable file names"""