summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2014-08-03 08:34:10 (GMT)
committerKevin Smith <git@kismith.co.uk>2014-08-03 12:27:49 (GMT)
commitb3c5aaea2fe185378d340ad1cdfe7ef502c1ab24 (patch)
tree6905c144369f6cf6df14a32ac012b143fa4c4e2b /QA/UnitTest/SConscript
parent9776bbeb1b31e651e8f2a0c9c102b6440dd1ff20 (diff)
downloadswift-b3c5aaea2fe185378d340ad1cdfe7ef502c1ab24.zip
swift-b3c5aaea2fe185378d340ad1cdfe7ef502c1ab24.tar.bz2
Allow injection of flags into unit test checker
Some projects (e.g. Eve-Xin) piggy-back on Swift's build system, but are unable to do the same with unit tests until this patch (because the checker will need to link against the unknown library to test it). This patch allows them to set INJECTED_UNITTEST_FLAGS, which will get included in the checker's compilation if set. Test-Information: Added unit test to Eve-Xin, which builds and runs. Change-Id: I58ffb2043b968144ad10096b83ac9d88f54f72f3
Diffstat (limited to 'QA/UnitTest/SConscript')
-rw-r--r--QA/UnitTest/SConscript3
1 files changed, 2 insertions, 1 deletions
diff --git a/QA/UnitTest/SConscript b/QA/UnitTest/SConscript
index 53c38f5..0cacc7c 100644
--- a/QA/UnitTest/SConscript
+++ b/QA/UnitTest/SConscript
@@ -9,6 +9,7 @@ if env["TEST"] :
if env["SCONS_STAGE"] == "build" :
myenv = env.Clone()
myenv.UseFlags(env.get("CHECKER_FLAGS",""))
+ myenv.UseFlags(env.get("INJECTED_UNITTEST_FLAGS","")) # So things that piggy-back our build system can piggy-back our test system too
myenv.UseFlags(env.get("SLIMBER_FLAGS",""))
myenv.UseFlags(env.get("SWIFT_CONTROLLERS_FLAGS",""))
myenv.UseFlags(env.get("SWIFTOOLS_FLAGS",""))
@@ -25,4 +26,4 @@ if env["TEST"] :
myenv.Program("checker", lib)
else :
checker = myenv.Program("checker", env["UNITTEST_SOURCES"] + env["UNITTEST_OBJECTS"])
- myenv.Test(checker, is_checker = True) \ No newline at end of file
+ myenv.Test(checker, is_checker = True)