blob: 53c38f5aca956e6b57053e425ee5729b5606e25b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
import os
Import("env")
if env["TEST"] :
if env["SCONS_STAGE"] == "flags" :
env["UNITTEST_SOURCES"] = []
env["UNITTEST_OBJECTS"] = []
if env["SCONS_STAGE"] == "build" :
myenv = env.Clone()
myenv.UseFlags(env.get("CHECKER_FLAGS",""))
myenv.UseFlags(env.get("SLIMBER_FLAGS",""))
myenv.UseFlags(env.get("SWIFT_CONTROLLERS_FLAGS",""))
myenv.UseFlags(env.get("SWIFTOOLS_FLAGS",""))
myenv.UseFlags(env.get("LIMBER_FLAGS",""))
myenv.UseFlags(env.get("SWIFTEN_FLAGS",""))
myenv.UseFlags(env.get("CPPUNIT_FLAGS",""))
myenv.UseFlags(env.get("SWIFTEN_DEP_FLAGS", ""))
if env.get("HAVE_LIBXML") :
myenv.Append(CPPDEFINES = ["HAVE_LIBXML"])
if env.get("HAVE_EXPAT") :
myenv.Append(CPPDEFINES = ["HAVE_EXPAT"])
if env["TEST_CREATE_LIBRARIES"] :
lib = myenv.StaticLibrary("Swift_UnitTests", env["UNITTEST_SOURCES"] + env["UNITTEST_OBJECTS"])
myenv.Program("checker", lib)
else :
checker = myenv.Program("checker", env["UNITTEST_SOURCES"] + env["UNITTEST_OBJECTS"])
myenv.Test(checker, is_checker = True)
|