Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r79628 - trunk/tools/build/v2/test
From: jurko.gospodnetic_at_[hidden]
Date: 2012-07-20 15:06:07


Author: jurko
Date: 2012-07-20 15:06:07 EDT (Fri, 20 Jul 2012)
New Revision: 79628
URL: http://svn.boost.org/trac/boost/changeset/79628

Log:
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.
Text files modified:
   trunk/tools/build/v2/test/BoostBuild.py | 10 ++++++----
   1 files changed, 6 insertions(+), 4 deletions(-)

Modified: trunk/tools/build/v2/test/BoostBuild.py
==============================================================================
--- trunk/tools/build/v2/test/BoostBuild.py (original)
+++ trunk/tools/build/v2/test/BoostBuild.py 2012-07-20 15:06:07 EDT (Fri, 20 Jul 2012)
@@ -333,8 +333,9 @@
                 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 @@
         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)
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk