From b3dfb80c15cae24c66d07425bb7a327528438a55 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Thu, 9 Nov 2017 00:59:06 +0200 Subject: Tests can be run with an external Meson command. --- run_project_tests.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'run_project_tests.py') diff --git a/run_project_tests.py b/run_project_tests.py index 17e095b..d3da4e6 100755 --- a/run_project_tests.py +++ b/run_project_tests.py @@ -33,7 +33,7 @@ import time import multiprocessing import concurrent.futures as conc import re -from run_unittests import get_fake_options, run_configure_inprocess +from run_unittests import get_fake_options, run_configure from run_tests import get_backend_commands, get_backend_args_for_dir, Backend from run_tests import ensure_backend_detects_changes @@ -327,9 +327,9 @@ def _run_test(testdir, test_build_dir, install_dir, extra_args, compiler, backen test_args = parse_test_args(testdir) gen_start = time.time() # Configure in-process - gen_command = [meson_command, '--prefix', '/usr', '--libdir', 'lib', testdir, test_build_dir]\ + gen_args = ['--prefix', '/usr', '--libdir', 'lib', testdir, test_build_dir]\ + flags + test_args + extra_args - (returncode, stdo, stde) = run_configure_inprocess(gen_command) + (returncode, stdo, stde) = run_configure(meson_command, gen_args) try: logfile = os.path.join(test_build_dir, 'meson-logs/meson-log.txt') with open(logfile, errors='ignore') as f: -- cgit v1.1 From 5d51bc79c7555e681a0c638da9528458257744ae Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sat, 11 Nov 2017 01:53:23 +0200 Subject: Replaced sys.executable use with the mesonlib equivalent. --- run_project_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'run_project_tests.py') diff --git a/run_project_tests.py b/run_project_tests.py index d3da4e6..27caabd 100755 --- a/run_project_tests.py +++ b/run_project_tests.py @@ -603,7 +603,7 @@ def check_meson_commands_work(): testdir = 'test cases/common/1 trivial' with AutoDeletedDir(tempfile.mkdtemp(prefix='b ', dir='.')) as build_dir: print('Checking that configuring works...') - gen_cmd = [sys.executable, meson_command, testdir, build_dir] + backend_flags + gen_cmd = mesonlib.meson_command + [testdir, build_dir] + backend_flags pc, o, e = Popen_safe(gen_cmd) if pc.returncode != 0: raise RuntimeError('Failed to configure {!r}:\n{}\n{}'.format(testdir, e, o)) -- cgit v1.1 From 105ea1e597a6ec5e711d95ec6339597ef759c475 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Mon, 20 Nov 2017 22:15:08 +0200 Subject: Make the full test suite runnable with an external command. --- run_project_tests.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'run_project_tests.py') diff --git a/run_project_tests.py b/run_project_tests.py index 27caabd..b94a976 100755 --- a/run_project_tests.py +++ b/run_project_tests.py @@ -322,13 +322,30 @@ def run_test(skipped, testdir, extra_args, compiler, backend, flags, commands, s finally: mlog.shutdown() # Close the log file because otherwise Windows wets itself. +def pass_prefix_to_test(dirname): + if '40 prefix' in dirname: + return False + return True + +def pass_libdir_to_test(dirname): + if '8 install' in dirname: + return False + if '39 libdir' in dirname: + return False + return True + def _run_test(testdir, test_build_dir, install_dir, extra_args, compiler, backend, flags, commands, should_fail): compile_commands, clean_commands, install_commands, uninstall_commands = commands test_args = parse_test_args(testdir) gen_start = time.time() # Configure in-process - gen_args = ['--prefix', '/usr', '--libdir', 'lib', testdir, test_build_dir]\ - + flags + test_args + extra_args + if pass_prefix_to_test(testdir): + gen_args = ['--prefix', '/usr'] + else: + gen_args = [] + if pass_libdir_to_test(testdir): + gen_args += ['--libdir', 'lib'] + gen_args += [testdir, test_build_dir] + flags + test_args + extra_args (returncode, stdo, stde) = run_configure(meson_command, gen_args) try: logfile = os.path.join(test_build_dir, 'meson-logs/meson-log.txt') -- cgit v1.1