summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-04-17 10:42:55 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-04-18 19:11:46 (GMT)
commiteadf2fa562b8017b505151a171a8f8ca7796cab6 (patch)
tree60f29125661103b0e77f648ca559b06255267a08 /QA/UnitTest
parent60925bd2f77df3be75ad46118a940a096499f18b (diff)
downloadswift-contrib-eadf2fa562b8017b505151a171a8f8ca7796cab6.zip
swift-contrib-eadf2fa562b8017b505151a171a8f8ca7796cab6.tar.bz2
Added option to build library with tests.
Diffstat (limited to 'QA/UnitTest')
-rw-r--r--QA/UnitTest/SConscript13
1 files changed, 8 insertions, 5 deletions
diff --git a/QA/UnitTest/SConscript b/QA/UnitTest/SConscript
index 25e9b05..3876919 100644
--- a/QA/UnitTest/SConscript
+++ b/QA/UnitTest/SConscript
@@ -26,8 +26,11 @@ if env["TEST"] :
myenv.Append(CPPDEFINES = ["HAVE_LIBXML"])
if env.get("HAVE_EXPAT") :
myenv.Append(CPPDEFINES = ["HAVE_EXPAT"])
- checker = myenv.Program("checker", env["UNITTEST_SOURCES"] + env["UNITTEST_OBJECTS"])
- for i in ["HOME", "USERPROFILE", "APPDATA"]:
- if os.environ.get(i, "") :
- myenv["ENV"][i] = os.environ[i]
- myenv.Test(checker, is_checker = True)
+ if env["TEST_CREATE_LIBRARIES"] :
+ myenv.StaticLibrary("Swift_UnitTests", env["UNITTEST_SOURCES"] + env["UNITTEST_OBJECTS"])
+ else :
+ checker = myenv.Program("checker", env["UNITTEST_SOURCES"] + env["UNITTEST_OBJECTS"])
+ for i in ["HOME", "USERPROFILE", "APPDATA"]:
+ if os.environ.get(i, "") :
+ myenv["ENV"][i] = os.environ[i]
+ myenv.Test(checker, is_checker = True)