aboutsummaryrefslogtreecommitdiff
path: root/run_project_tests.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-06-10 13:04:00 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2017-06-10 18:55:50 +0530
commit9308a6d923ecdfabb40d88e1590226172ea95e43 (patch)
tree26ffa6a115fcacb1ee0741c6d946f8a43d6abbbb /run_project_tests.py
parentc1e9c757ebbe7a26b126ee8cb2106f6f8dffa322 (diff)
downloadmeson-9308a6d923ecdfabb40d88e1590226172ea95e43.zip
meson-9308a6d923ecdfabb40d88e1590226172ea95e43.tar.gz
meson-9308a6d923ecdfabb40d88e1590226172ea95e43.tar.bz2
tests: Add Boost unit tests and project tests on Windows
Boost tests are disabled on Windows for now because the detection is actually completely broken. Once that's fixed (after the release) we can enable it again.
Diffstat (limited to 'run_project_tests.py')
-rwxr-xr-xrun_project_tests.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/run_project_tests.py b/run_project_tests.py
index 71d6c0c..66d7eb0 100755
--- a/run_project_tests.py
+++ b/run_project_tests.py
@@ -371,7 +371,7 @@ def _run_test(testdir, test_build_dir, install_dir, extra_args, compiler, backen
return TestResult(validate_install(testdir, install_dir, compiler), BuildStep.validate, stdo, stde, mesonlog, gen_time, build_time, test_time)
def gather_tests(testdir):
- tests = [t.replace('\\', '/').split('/', 2)[2] for t in glob(os.path.join(testdir, '*'))]
+ tests = [t.replace('\\', '/').split('/', 2)[2] for t in glob(testdir + '/*')]
testlist = [(int(t.split()[0]), t) for t in tests]
testlist.sort()
tests = [os.path.join(testdir, t[1]) for t in testlist]
@@ -425,7 +425,6 @@ def detect_tests_to_run():
('platform-windows', 'windows', not mesonlib.is_windows() and not mesonlib.is_cygwin()),
('platform-linux', 'linuxlike', mesonlib.is_osx() or mesonlib.is_windows()),
- ('framework', 'frameworks', mesonlib.is_osx() or mesonlib.is_windows() or mesonlib.is_cygwin()),
('java', 'java', backend is not Backend.ninja or mesonlib.is_osx() or not have_java()),
('C#', 'csharp', backend is not Backend.ninja or not shutil.which('mcs')),
('vala', 'vala', backend is not Backend.ninja or not shutil.which('valac')),
@@ -436,7 +435,15 @@ def detect_tests_to_run():
('swift', 'swift', backend not in (Backend.ninja, Backend.xcode) or not shutil.which('swiftc')),
('python3', 'python3', backend is not Backend.ninja),
]
- return [(name, gather_tests('test cases/' + subdir), skip) for name, subdir, skip in all_tests]
+ gathered_tests = [(name, gather_tests('test cases/' + subdir), skip) for name, subdir, skip in all_tests]
+ if mesonlib.is_windows():
+ # TODO: Set BOOST_ROOT in .appveyor.yml
+ gathered_tests += [('framework', ['test cases/frameworks/1 boost'], 'BOOST_ROOT' not in os.environ)]
+ elif mesonlib.is_osx() or mesonlib.is_cygwin():
+ gathered_tests += [('framework', gather_tests('test cases/frameworks'), True)]
+ else:
+ gathered_tests += [('framework', gather_tests('test cases/frameworks'), False)]
+ return gathered_tests
def run_tests(all_tests, log_name_base, extra_args):
global stop, executor, futures