Permalink
Browse files

be smarter about picking python name to invoke smoke.py

  • Loading branch information...
Dan Crosta
Dan Crosta committed Jan 31, 2012
1 parent ad30979 commit c4c624cb973af1f6d225333aefa51fe06e04e22f
Showing with 11 additions and 2 deletions.
  1. +11 −2 SConstruct
View
@@ -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")

0 comments on commit c4c624c

Please sign in to comment.