From 1570a90822941b3f0e6cc8efa50002eb528bee43 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Sun, 7 May 2017 11:15:40 +0530 Subject: 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 --- run_tests.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'run_tests.py') 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() -- cgit v1.1