summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-08-12 17:59:10 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-08-12 17:59:10 (GMT)
commit283a6801fd11aeaf38b2298399c2bf622f743cf4 (patch)
treea63e3401309793844c29b08512d7a9dc12636fb3 /SConstruct
parent2a28c1be20477ddf25a233ee34c991951295058b (diff)
downloadswift-contrib-283a6801fd11aeaf38b2298399c2bf622f743cf4.zip
swift-contrib-283a6801fd11aeaf38b2298399c2bf622f743cf4.tar.bz2
Added Slimber & valgrind testing to SCons.
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct8
1 files changed, 5 insertions, 3 deletions
diff --git a/SConstruct b/SConstruct
index 463dc0b..2feadd0 100644
--- a/SConstruct
+++ b/SConstruct
@@ -11,6 +11,8 @@ vars.Add(BoolVariable("warnings", "Compile with warnings turned on",
"yes" if os.name != "nt" else "no"))
if os.name != "nt" :
vars.Add(BoolVariable("coverage", "Compile with coverage information", "no"))
+if os.name == "posix" :
+ vars.Add(BoolVariable("valgrind", "Run tests with valgrind", "no"))
if os.name == "mac" :
vars.Add(BoolVariable("universal", "Create universal binaries", "no"))
if os.name == "nt" :
@@ -60,6 +62,9 @@ if env.get("coverage", 0) :
env.Append(CCFLAGS = ["-fprofile-arcs", "-ftest-coverage"])
env.Append(LINKFLAGS = ["-fprofile-arcs", "-ftest-coverage"])
+if env.get("valgrind", 0) :
+ env["TEST_RUNNER"] = "valgrind --suppressions=QA/valgrind.supp -q --leak-check=full --track-origins=yes "
+
if env["PLATFORM"] == "win32" :
env.Append(LIBS = ["dnsapi", "ws2_32", "wsock32"])
env.Append(CCFLAGS = "/EHsc")
@@ -126,9 +131,6 @@ if env["PLATFORM"] == "win32" :
conf = Configure(conf_env)
-if conf.CheckCHeader("pthread.h") :
- env["HAVE_PTHREAD"] = 1
-
if conf.CheckLib("z") :
env.Append(LIBS = "z")
env["ZLIB_FLAGS"] = ""