summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Crosta <dcrosta@10gen.com>2012-01-31 10:47:49 -0500
committerDan Crosta <dcrosta@10gen.com>2012-01-31 10:47:49 -0500
commitc4c624cb973af1f6d225333aefa51fe06e04e22f (patch)
tree0c55c0f092570a97c4db816fe70128d0c413bd3e
parentad30979f8afeb60121dfb17195b23825a1fb7cec (diff)
downloadmongo-c4c624cb973af1f6d225333aefa51fe06e04e22f.tar.gz
be smarter about picking python name to invoke smoke.py
-rw-r--r--SConstruct13
1 files changed, 11 insertions, 2 deletions
diff --git a/SConstruct b/SConstruct
index 0de0cea02cb..8d31c8f21a6 100644
--- a/SConstruct
+++ b/SConstruct
@@ -755,6 +755,15 @@ def add_exe(target):
return target + ".exe"
return target
+def smoke_python_name():
+ # if this script is being run by py2.5 or greater,
+ # then we assume that "python" points to a 2.5 or
+ # greater python VM. otherwise, explicitly use 2.5
+ # which we assume to be installed.
+ if sys.version_info >= (2, 5):
+ return "python"
+ return "python2.5"
+
def setupBuildInfoFile( outFile ):
version = utils.getGitVersion()
if len(moduleNames) > 0:
@@ -1250,7 +1259,7 @@ def addSmoketest( name, deps ):
else:
target = name[5].lower() + name[6:]
- addTest(name, deps, [ "python2.5 buildscripts/smoke.py " + " ".join(smokeFlags) + ' ' + target ])
+ addTest(name, deps, [ smoke_python_name() + " buildscripts/smoke.py " + " ".join(smokeFlags) + ' ' + target ])
addSmoketest( "smoke", [ add_exe( "test" ) ] )
addSmoketest( "smokePerf", [ "perftest" ] )
@@ -1648,7 +1657,7 @@ def build_and_test_client(env, target, source):
call(scons_command + ["libmongoclient.a", "clientTests"], cwd=installDir)
- return bool(call(["python2.5", "buildscripts/smoke.py",
+ return bool(call([smoke_python_name(), "buildscripts/smoke.py",
"--test-path", installDir, "client"]))
env.Alias("clientBuild", [mongod, installDir], [build_and_test_client])
env.AlwaysBuild("clientBuild")