Fix documentation build under maverick (doxygen 1.7.1)
[senf.git] / site_scons / SparseTestHack.py
index 52b05e6..319ee28 100644 (file)
@@ -84,7 +84,7 @@ def setup(env):
 # This needs to be called after all build targets have been set
 # up. This is important since the list of object targets needs to be
 # complete.
-def build(env, accept_unknown_tests=False):
+def build(env, accept_unknown_tests=False, verbose=False):
     env = env.Clone(LIBS = [ '$EXTRA_LIBS' ])
     if env.has_key("only_tests"):
         only_tests = {}
@@ -124,6 +124,10 @@ def build(env, accept_unknown_tests=False):
 
         env.RealBoostUnitTest(target, objects, **kw)
 
+    if verbose and only_tests and not env.GetOption('no_progress'):
+        SCons.Util.display("scons: building tests: " + ", ".join("`%s'" % str(k)
+                                                                 for k,v in only_tests.iteritems()
+                                                                 if v))
     if not accept_unknown_tests:
         only_tests = [ k for k,v in only_tests.iteritems() if not v ]
         if only_tests:
@@ -133,7 +137,7 @@ def build(env, accept_unknown_tests=False):
 def findSCMChanges(env):
 
     def scmchanges(dir):
-        if os.popen("cd %s; svnversion" % dir.abspath).read().strip() == "exported":
+        if os.popen("cd %s; svnversion" % dir.abspath).read().strip() in ("","exported"):
             return [ dir.Entry(x)
                      for x in os.popen("cd %s; git ls-files --modified" 
                                        % dir.abspath).read().strip().split("\n") ]