From 42e0707fb87ddb91fb87844528c3e347d1d28f0c Mon Sep 17 00:00:00 2001 From: "Meredith L. Patterson" <mlp@thesmartpolitenerd.com> Date: Fri, 22 Nov 2013 12:00:14 -0600 Subject: [PATCH] slightly more elegant way to pass around which tests to run --- SConstruct | 1 + src/bindings/php/SConscript | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/SConstruct b/SConstruct index fd62eda0..8a801f76 100644 --- a/SConstruct +++ b/SConstruct @@ -93,6 +93,7 @@ env["ENV"].update(x for x in os.environ.items() if x[0].startswith("CCC_")) #rootpath = env['ROOTPATH'] = os.path.abspath('.') #env.Append(CPPPATH=os.path.join('#', "hammer")) +env['testruns'] = [] testruns = [] targets = ["$libpath", diff --git a/src/bindings/php/SConscript b/src/bindings/php/SConscript index 7e5aae80..7e86159a 100644 --- a/src/bindings/php/SConscript +++ b/src/bindings/php/SConscript @@ -1,6 +1,6 @@ # -*- python -*- import os, os.path -Import('env libhammer_shared testruns') +Import('env libhammer_shared') phpenv = env.Clone(IMPLICIT_COMMAND_DEPENDENCIES = 0) @@ -16,7 +16,8 @@ Default(swig_src, bindings_src, libhammer_php) phptestenv = phpenv.Clone() phptestenv['ENV']['LD_LIBRARY_PATH'] = os.path.dirname(str(libhammer_shared[0])) -phptests = phptestenv.Dir('Tests/') -testruns.append(phptestenv.Alias("testphp", phptestenv.Command(phptests, [libhammer_php], "phpunit -v --include-path "+os.getcwd()+" $TARGET"))) - +phptests = ['Tests'] +testphp = phptestenv.Alias("testphp", phptestenv.Command(phptests, [libhammer_php], "phpunit -v --include-path "+os.getcwd()+" $TARGET")) +env['testruns'].append(testphp) +print "Testing: " + str([str(x[0]) for x in env['testruns']]) -- GitLab