2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-09 23:12:23 +00:00

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]
This commit is contained in:
Jurko Gospodnetić
2012-07-20 19:06:07 +00:00
parent ac6b378f22
commit f9e355ede9

View File

@@ -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)