From f9e355ede985da13651d2b3b93cd80980fead7bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurko=20Gospodneti=C4=87?= Date: Fri, 20 Jul 2012 19:06:07 +0000 Subject: [PATCH] Updated the internal Boost Build testing framework to support writing or touching files in its test folder without waiting for a timestamp change from a previous build run. This should allow tweaking the tests to run with a bit less delay (up to 2s as currently implemented) between test runs where possible. [SVN r79628] --- test/BoostBuild.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/BoostBuild.py b/test/BoostBuild.py index b1e01253c..79ed775a3 100644 --- a/test/BoostBuild.py +++ b/test/BoostBuild.py @@ -333,8 +333,9 @@ class Tester(TestCmd.TestCmd): os.chmod(name, os.stat(name)[0] | 0222) os.path.walk(".", make_writable, None) - def write(self, file, content): - self.wait_for_time_change_since_last_build() + def write(self, file, content, wait=True): + if wait: + self.wait_for_time_change_since_last_build() nfile = self.native_file_name(file) try: os.makedirs(os.path.dirname(nfile)) @@ -371,8 +372,9 @@ class Tester(TestCmd.TestCmd): self.write(dst, self.read(src, 1)) os.utime(dst_name, (stats.st_atime, stats.st_mtime)) - def touch(self, names): - self.wait_for_time_change_since_last_build() + def touch(self, names, wait=True): + if wait: + self.wait_for_time_change_since_last_build() for name in self.adjust_names(names): os.utime(self.native_file_name(name), None)