aboutsummaryrefslogtreecommitdiff
path: root/run_tests.py
diff options
context:
space:
mode:
authorRyan Prichard <rprichard@google.com>2017-11-10 14:39:14 -0800
committerRyan Prichard <rprichard@google.com>2017-11-15 11:35:23 -0800
commita9793de36cbda275ae9307cd2270fc4860468e48 (patch)
treebbae34d52ca535b087eb74af58bc47a0826e16e1 /run_tests.py
parentaf5e4b9140cbac60458f1f35282b47ac07c96ffd (diff)
downloadndk-a9793de36cbda275ae9307cd2270fc4860468e48.tar.gz
Windows: get libc++ tests running
* Convert test names to use forward slashes * Rescan the list of libc++ tests in each worker * Invoke lit using the 'python' executable. This change matches the existing behavior of lit.py on Unix (#!/usr/bin/env python). Test: ./run_tests.py --rebuild (on Windows) Test: ./run_tests.py (on Linux) Change-Id: I84c8e79babba1b8306886290dcc7db8ce8c1e78a
Diffstat (limited to 'run_tests.py')
-rwxr-xr-xrun_tests.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/run_tests.py b/run_tests.py
index b9f679e42..10ccf4f5e 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -48,6 +48,7 @@ import ndk.workqueue
import tests.filters as filters
import tests.printers as printers
import tests.testlib as testlib
+import tests.util as util
DEVICE_TEST_BASE_DIR = '/data/local/tmp/tests'
@@ -260,10 +261,8 @@ def enumerate_basic_tests(out_dir_base, build_cfg, build_system, test_filter):
test_dir = os.path.join(tests_dir, test_subdir)
out_dir = os.path.join(test_dir, build_cfg.abi)
test_relpath = os.path.relpath(out_dir, out_dir_base)
- device_relpath = test_relpath
- if sys.platform == 'win32':
- device_relpath = device_relpath.replace('\\', '/')
- device_dir = posixpath.join(DEVICE_TEST_BASE_DIR, device_relpath)
+ device_dir = posixpath.join(
+ DEVICE_TEST_BASE_DIR, util.to_posix_path(test_relpath))
for test_file in os.listdir(out_dir):
if test_file.endswith('.so'):
continue
@@ -286,8 +285,9 @@ def enumerate_libcxx_tests(out_dir_base, build_cfg, build_system, test_filter):
if not test_file.endswith('.exe'):
continue
test_relpath = os.path.relpath(root, out_dir_base)
- device_dir = posixpath.join(DEVICE_TEST_BASE_DIR, test_relpath)
- suite_name = os.path.relpath(root, tests_dir)
+ device_dir = posixpath.join(
+ DEVICE_TEST_BASE_DIR, util.to_posix_path(test_relpath))
+ suite_name = util.to_posix_path(os.path.relpath(root, tests_dir))
# Our file has a .exe extension, but the name should match the
# source file for the filters to work.
@@ -298,7 +298,6 @@ def enumerate_libcxx_tests(out_dir_base, build_cfg, build_system, test_filter):
if not suite_name == 'libc++':
if not suite_name.startswith('libc++/'):
raise ValueError(suite_name)
- assert suite_name.startswith('libc++/')
# According to the test runner, these are all part of the
# "libc++" test, and the rest of the data is the subtest name.
# i.e. libc++/foo/bar/baz.cpp.exe is actually