blob: f93cdc2adf81ac76750a1216ff4bf113842d0297 (
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
29
30
31
32
33
34
35
36
|
import os
Import("env")
# The checker
checker_env = env.Clone()
checker_env.MergeFlags(env["CPPUNIT_FLAGS"])
checker_env.Library("Checker", "checker.cpp")
env["CHECKER_FLAGS"] = {
"LIBS": ["Checker"],
"LIBPATH": [Dir(".")],
"LINKFLAGS": ["/SUBSYSTEM:CONSOLE"] if env["PLATFORM"] == "win32" else []
}
if env["TEST"] :
myenv = env.Clone()
myenv.MergeFlags(env["CHECKER_FLAGS"])
myenv.MergeFlags(env["SLIMBER_FLAGS"])
myenv.MergeFlags(env["SWIFT_CONTROLLERS_FLAGS"])
myenv.MergeFlags(env["SWIFTEN_FLAGS"])
myenv.MergeFlags(env["CPPUNIT_FLAGS"])
myenv.MergeFlags(env["LIBIDN_FLAGS"])
myenv.MergeFlags(env["BOOST_FLAGS"])
myenv.MergeFlags(env["SQLITE_FLAGS"])
myenv.MergeFlags(env.get("LIBXML_FLAGS", ""))
myenv.MergeFlags(env.get("EXPAT_FLAGS", ""))
myenv.MergeFlags(env["ZLIB_FLAGS"])
if env.get("HAVE_LIBXML") :
myenv.Append(CPPDEFINES = ["HAVE_LIBXML"])
if env.get("HAVE_EXPAT") :
myenv.Append(CPPDEFINES = ["HAVE_EXPAT"])
checker = myenv.Program("checker", env["UNITTEST_SOURCES"])
for i in ["HOME", "USERPROFILE", "APPDATA"]:
if os.environ.get(i, "") :
myenv["ENV"][i] = os.environ[i]
myenv.Test(checker)
|