diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-05-07 11:15:40 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-05-09 14:23:15 +0530 |
commit | 1570a90822941b3f0e6cc8efa50002eb528bee43 (patch) | |
tree | d9ae927775b5794fc5c8c31e0ce82e5801e10763 /run_tests.py | |
parent | 41f51f567a167919b0e3bc88ae4b8cb05819971d (diff) | |
download | meson-1570a90822941b3f0e6cc8efa50002eb528bee43.zip meson-1570a90822941b3f0e6cc8efa50002eb528bee43.tar.gz meson-1570a90822941b3f0e6cc8efa50002eb528bee43.tar.bz2 |
project tests: Also regen before building
This actually caught a cached-dependency related bug for me that the
test-time regen did not. I also increased the ninja wait time to
1 second because that's actually how long you need to sleep to be
guaranteed that a change will be detected.
Must poke upstream about https://github.com/ninja-build/ninja/issues/371
Diffstat (limited to 'run_tests.py')
-rwxr-xr-x | run_tests.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/run_tests.py b/run_tests.py index d0a67e8..a374839 100755 --- a/run_tests.py +++ b/run_tests.py @@ -16,6 +16,7 @@ import os import sys +import time import shutil import subprocess import platform @@ -98,6 +99,13 @@ def get_backend_commands(backend, debug=False): raise AssertionError('Unknown backend: {!r}'.format(backend)) return cmd, clean_cmd, test_cmd, install_cmd, uninstall_cmd +def ensure_backend_detects_changes(backend): + # This is needed to increase the difference between build.ninja's + # timestamp and the timestamp of whatever you changed due to a Ninja + # bug: https://github.com/ninja-build/ninja/issues/371 + if backend is Backend.ninja: + time.sleep(1) + def get_fake_options(prefix): import argparse opts = argparse.Namespace() |