From: g0dil Date: Fri, 9 Oct 2009 14:33:18 +0000 (+0000) Subject: Fix last test_changes commit ... X-Git-Url: http://g0dil.de/git?p=senf.git;a=commitdiff_plain;h=47d9f267c8ae9197c48492622399ac24d26bc37b Fix last test_changes commit ... git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1492 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/SConstruct b/SConstruct index 435bfb4..0cd8837 100644 --- a/SConstruct +++ b/SConstruct @@ -120,7 +120,8 @@ senfutil.parseArguments( ) if 'test_changes' in COMMAND_LINE_TARGETS and not env.has_key('only_tests'): - env['only_tests'] = " ".join(x.abspath for x in SparseTestHack.findSCMChanges()) + import SparseTestHack + env['only_tests'] = " ".join(x.abspath for x in SparseTestHack.findSCMChanges(env)) if env.has_key('only_tests') : env['sparse_tests'] = True Export('env') diff --git a/site_scons/SparseTestHack.py b/site_scons/SparseTestHack.py index f1a6f83..52b05e6 100644 --- a/site_scons/SparseTestHack.py +++ b/site_scons/SparseTestHack.py @@ -1,4 +1,4 @@ -import SCons.Node, SCons.Node.FS, SCons.Util, SCons.Errors +import SCons.Node, SCons.Node.FS, SCons.Util, SCons.Errors, os ##################################################################### # This IS a hack .. but a very useful one: The hack will remove the @@ -130,7 +130,7 @@ def build(env, accept_unknown_tests=False): raise SCons.Errors.StopError("Unknown unit tests (only_tests): %s." % ", ".join("`%s'" % x for x in only_tests)) -def findSCMChanges(): +def findSCMChanges(env): def scmchanges(dir): if os.popen("cd %s; svnversion" % dir.abspath).read().strip() == "exported":