diff options
| author | Greg Hackmann <ghackmann@google.com> | 2018-12-04 15:23:58 -0800 |
|---|---|---|
| committer | Greg Hackmann <ghackmann@google.com> | 2018-12-05 09:18:20 -0800 |
| commit | e865379dd0fea47bdca6b8f056752aabbdca9301 (patch) | |
| tree | fec4cc5ef46110634888748cf8d7fc10a0d17c67 /android/tools | |
| parent | ec25dbb1586289fda85831d31a8510f8a0d53c1f (diff) | |
| download | platform_external_ltp-e865379dd0fea47bdca6b8f056752aabbdca9301.tar.gz platform_external_ltp-e865379dd0fea47bdca6b8f056752aabbdca9301.tar.bz2 platform_external_ltp-e865379dd0fea47bdca6b8f056752aabbdca9301.zip | |
ANDROID: cki_coverage: add timers testsuite
We're currently building and running the timers.* testcases, but
cki_coverage didn't inspect these tests. After adding this testsuite to
the list of available and stable tests, we're now correctly reflecting
coverage for these syscalls:
- clock_gettime
- clock_settime
- timer_create
- timer_delete
- timer_settime
Bug: 112484616
Test: external/ltp/android/tools/cki_coverage.py
Change-Id: Ia99410720c72a8c16b93520422e9db160efb0bbf
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Diffstat (limited to 'android/tools')
| -rwxr-xr-x | android/tools/cki_coverage.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/android/tools/cki_coverage.py b/android/tools/cki_coverage.py index e5422d548..9a48c57f3 100755 --- a/android/tools/cki_coverage.py +++ b/android/tools/cki_coverage.py @@ -137,8 +137,9 @@ class CKI_Coverage(object): coverage when in fact they do. """ - LTP_SYSCALL_ROOT = os.path.join(os.environ["ANDROID_BUILD_TOP"], - "external/ltp/testcases/kernel/syscalls") + LTP_KERNEL_ROOT = os.path.join(os.environ["ANDROID_BUILD_TOP"], + "external/ltp/testcases/kernel") + LTP_KERNEL_TESTSUITES = ["syscalls", "timers"] DISABLED_IN_LTP_PATH = os.path.join(os.environ["ANDROID_BUILD_TOP"], "external/ltp/android/tools/disabled_tests.txt") @@ -166,11 +167,16 @@ class CKI_Coverage(object): Load the list of all syscall tests existing in LTP. """ - for path, dirs, files in os.walk(self.LTP_SYSCALL_ROOT): + for testsuite in self.LTP_KERNEL_TESTSUITES: + self.__load_ltp_testsuite(testsuite) + + def __load_ltp_testsuite(self, testsuite): + root = os.path.join(self.LTP_KERNEL_ROOT, testsuite) + for path, dirs, files in os.walk(root): for filename in files: basename, ext = os.path.splitext(filename) if ext != ".c": continue - self.ltp_full_set.append("syscalls.%s" % basename) + self.ltp_full_set.append("%s.%s" % (testsuite, basename)) def load_ltp_disabled_tests(self): """Load the list of LTP tests not being compiled. |
