diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2013-02-16 21:49:00 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2013-02-16 21:49:00 +0200 |
commit | 8c6c0d9b82f46e808eeff658e73ee241ea58f2a0 (patch) | |
tree | b109f2cd841f03008bf84448a8db81e465c0ac19 /run_tests.py | |
parent | d5f7207e2ea2bbeebfdbb08fdfa478ad7ab713db (diff) | |
download | meson-8c6c0d9b82f46e808eeff658e73ee241ea58f2a0.zip meson-8c6c0d9b82f46e808eeff658e73ee241ea58f2a0.tar.gz meson-8c6c0d9b82f46e808eeff658e73ee241ea58f2a0.tar.bz2 |
Fix regeneration rule so it is not triggered needlessly.
Diffstat (limited to 'run_tests.py')
-rwxr-xr-x | run_tests.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/run_tests.py b/run_tests.py index eb44bd9..2046509 100755 --- a/run_tests.py +++ b/run_tests.py @@ -19,15 +19,15 @@ import os, subprocess, shutil, sys test_build_dir = 'work area' install_dir = os.path.join(os.path.split(os.path.abspath(__file__))[0], 'install dir') -use_shell = len(sys.argv) == 1 +use_shell = len(sys.argv) > 1 builder_command = './builder.py' if use_shell: - generator_flags = [] + generator_flags = ['--generator', 'shell'] compile_commands = ['compile.sh'] test_commands = ['run_tests.sh'] install_commands = ['install.sh'] else: - generator_flags = ['--generator', 'ninja'] + generator_flags = [] compile_commands = ['ninja'] test_commands = ['ninja', 'test'] install_commands = ['ninja', 'install'] @@ -38,8 +38,8 @@ def run_test(testdir): os.mkdir(test_build_dir) os.mkdir(install_dir) print('Running test: ' + testdir) - p = subprocess.Popen([builder_command, '--prefix', install_dir, testdir, test_build_dir] +\ - generator_flags) + gen_command = [builder_command, '--prefix', install_dir, testdir, test_build_dir] + generator_flags + p = subprocess.Popen(gen_command) p.wait() if p.returncode != 0: raise RuntimeError('Generating the build system failed.') |