mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 01:21:03 +01:00
SERVER-5057 C++ Client Build Break
Remove support for building a shared client library from the client source distribution, because it is broken. Fix the clientBuild "scons" alias, to correctly build and test the C++ driver as part of the nightly build. There were some type errors, before.
This commit is contained in:
parent
51e9b45d89
commit
b8bb84091d
@ -68,10 +68,7 @@ for x in dirs:
|
||||
allClientFiles += Glob( "mongo/" + x + "*.cpp" )
|
||||
allClientFiles += Glob( "mongo/util/*.c" )
|
||||
|
||||
libs = []
|
||||
libs += env.SharedLibrary( "mongoclient" , allClientFiles )
|
||||
sharedClientLibName = str(libs[-1])
|
||||
libs += env.Library( "mongoclient" , allClientFiles )
|
||||
libs = env.Library( "mongoclient" , allClientFiles )
|
||||
|
||||
# install
|
||||
|
||||
@ -86,12 +83,11 @@ for x in dirs:
|
||||
|
||||
env.Alias( "install" , prefix )
|
||||
|
||||
|
||||
# example setup
|
||||
|
||||
clientTests = []
|
||||
clientEnv = env.Clone();
|
||||
clientEnv.Prepend( LIBS=["libmongoclient.a", sharedClientLibName])
|
||||
clientEnv.Prepend( LIBS=["mongoclient"] )
|
||||
clientEnv.Prepend( LIBPATH=["."] )
|
||||
|
||||
# examples
|
||||
|
@ -151,6 +151,7 @@ coreServerFiles = [ "util/version.cpp",
|
||||
] + env['MONGO_SCRIPTING_FILES']
|
||||
|
||||
clientFiles = commonFiles + [
|
||||
'client/clientAndShell.cpp',
|
||||
'client/clientOnly.cpp',
|
||||
'client/gridfs.cpp',
|
||||
'db/commands.cpp',
|
||||
@ -540,7 +541,7 @@ env.Alias( "mongoclient", '#/%s' % ( has_option( "sharedclient" ) and sharedClie
|
||||
|
||||
# client dist
|
||||
def build_and_test_client(env, target, source):
|
||||
from subprocess import call
|
||||
import subprocess
|
||||
|
||||
installDir = env.subst('$INSTALL_DIR', target=target, source=source)
|
||||
installDir = env.GetBuildPath(installDir)
|
||||
@ -549,9 +550,14 @@ def build_and_test_client(env, target, source):
|
||||
else:
|
||||
scons_command = ["scons"]
|
||||
|
||||
call(scons_command + ["libmongoclient.a", "clientTests"], cwd=installDir)
|
||||
exit_code = subprocess.call(scons_command + ["clientTests"], cwd=installDir)
|
||||
if exit_code:
|
||||
return exit_code
|
||||
|
||||
smoke_cmd = utils.smoke_command("--test-path", installDir, "client")
|
||||
exit_code = subprocess.call(smoke_cmd)
|
||||
if exit_code:
|
||||
return exit_code
|
||||
|
||||
return bool(call(utils.smoke_command([
|
||||
"--test-path", installDir, "client"])))
|
||||
env.Alias("clientBuild", [mongod, '$INSTALL_DIR'], [build_and_test_client])
|
||||
env.AlwaysBuild("clientBuild")
|
||||
|
Loading…
Reference in New Issue
Block a user