Boost logo

Boost-Commit :

From: grafikrobot_at_[hidden]
Date: 2007-08-15 16:15:37


Author: grafik
Date: 2007-08-15 16:15:36 EDT (Wed, 15 Aug 2007)
New Revision: 38702
URL: http://svn.boost.org/trac/boost/changeset/38702

Log:
Do some normalizing of paths to remove some of the variant feature subdirs that may be different based on platform and toolset. This fixes some tests that pass on GCC/Linux and not on MSVC/Windows.
Text files modified:
   trunk/tools/build/v2/test/BoostBuild.py | 29 ++++++++++++++++++++++++++++-
   1 files changed, 28 insertions(+), 1 deletions(-)

Modified: trunk/tools/build/v2/test/BoostBuild.py
==============================================================================
--- trunk/tools/build/v2/test/BoostBuild.py (original)
+++ trunk/tools/build/v2/test/BoostBuild.py 2007-08-15 16:15:36 EDT (Wed, 15 Aug 2007)
@@ -61,6 +61,8 @@
     for r in result:
         sequence.remove(r)
 
+features = [ 'threading-multi' ]
+
 lib_prefix = 1
 if windows:
     lib_prefix = 0
@@ -389,6 +391,15 @@
         self.unexpected_difference = copy.deepcopy(self.difference)
 
         self.last_build_time = time.time()
+
+ self.unexpected_difference.added_files \
+ = self.remove_variant_features(self.unexpected_difference.added_files)
+ self.unexpected_difference.removed_files \
+ = self.remove_variant_features(self.unexpected_difference.removed_files)
+ self.unexpected_difference.modified_files \
+ = self.remove_variant_features(self.unexpected_difference.modified_files)
+ self.unexpected_difference.touched_files \
+ = self.remove_variant_features(self.unexpected_difference.touched_files)
 
     def read(self, name):
         try:
@@ -433,7 +444,7 @@
     # All the 'ignore*' methods allow wildcards.
 
     # All names can be lists, which are taken to be directory components
- def expect_addition(self, names):
+ def expect_addition(self, names):
         for name in self.adjust_names(names):
                 try:
                         glob_remove(self.unexpected_difference.added_files,name)
@@ -670,6 +681,7 @@
             suffix = ''
 
         return name + suffix
+
 
     # Acceps either string of list of string and returns list of strings
     # Adjusts suffixes on all names.
@@ -691,6 +703,21 @@
     def wait_for_time_change(self):
         while int(time.time()) < int(self.last_build_time) + 1:
             time.sleep(0.1)
+
+ # Remove the variant feature sub-dir from a path.
+ def remove_variant_features(self, names):
+
+ def remove_features_(name):
+ elements = string.split(name,"/")
+ for feature in features:
+ try:
+ elements.remove(feature)
+ except:
+ pass
+ return string.join(elements,"/")
+
+ r = map(remove_features_,names)
+ return r
 
             
 class List:


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