From b3c5aaea2fe185378d340ad1cdfe7ef502c1ab24 Mon Sep 17 00:00:00 2001
From: Kevin Smith <git@kismith.co.uk>
Date: Sun, 3 Aug 2014 09:34:10 +0100
Subject: 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

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)
-- 
cgit v0.10.2-6-g49f6