X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=site_scons%2FSparseTestHack.py;h=72427869c34dd846410450e288f61eb30a8e4f02;hb=163314c6808b654e16ff7bf881e25fb21563d167;hp=52b05e63ccc8070f5625c708ad77c51d65d3abbb;hpb=47d9f267c8ae9197c48492622399ac24d26bc37b;p=senf.git diff --git a/site_scons/SparseTestHack.py b/site_scons/SparseTestHack.py index 52b05e6..7242786 100644 --- a/site_scons/SparseTestHack.py +++ b/site_scons/SparseTestHack.py @@ -6,7 +6,7 @@ import SCons.Node, SCons.Node.FS, SCons.Util, SCons.Errors, os # files needed explicitly. # # This works by building a list of all children (recursively) of the -# test sources. For each child we check, wether a file with the same +# test sources. For each child we check, whether a file with the same # name but an $OBJSUFFIX extension exists as a build target. In that # case, we add it to the list of needed objects (AND recursively scan # that objects children). @@ -80,11 +80,13 @@ def setup(env): env['BUILDERS']['RealBoostUnitTest'] = env['BUILDERS']['BoostUnitTest'] env['BUILDERS']['BoostUnitTest'] = AutoObjectBoostUnitTest env['_UNIT_TEST_LIST'] = [] + env.Append(EXTRA_LIBS = [ '$BOOSTREGEXLIB', '$BOOSTSIGNALSLIB', + '$BOOSTFSLIB', '$BOOSTSYSTEMLIB' ]) # 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 +126,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 +139,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") ]