Add support for shared library builds to tools/test-wrapper-gypbuild.py

by setting LD_LIBRARY_PATH as required

Review URL: http://codereview.chromium.org/7811016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9085 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
jkummerow@chromium.org 2011-08-31 14:15:42 +00:00
parent ccb262ea3a
commit f3fc54666a
3 changed files with 21 additions and 10 deletions

View File

@ -11,13 +11,7 @@
'../preparser/preparser.gyp:*',
'../samples/samples.gyp:*',
'../src/d8.gyp:d8',
],
'conditions': [
[ 'component!="shared_library"', {
'dependencies': [
'../test/cctest/cctest.gyp:*',
],
}]
'../test/cctest/cctest.gyp:*',
],
}
]

View File

@ -35,7 +35,6 @@
'target_name': 'cctest',
'type': 'executable',
'dependencies': [
'../../tools/gyp/v8.gyp:v8',
'resources',
],
'include_dirs': [
@ -136,6 +135,20 @@
'test-platform-win32.cc',
],
}],
['component=="shared_library"', {
# cctest can't be built against a shared library, so we need to
# depend on the underlying static target in that case.
'conditions': [
['v8_use_snapshot=="true"', {
'dependencies': ['../../tools/gyp/v8.gyp:v8_snapshot'],
},
{
'dependencies': ['../../tools/gyp/v8.gyp:v8_nosnapshot'],
}],
],
}, {
'dependencies': ['../../tools/gyp/v8.gyp:v8'],
}],
],
},
{

View File

@ -215,17 +215,21 @@ def Main():
for arg in args:
args_for_children += [arg]
returncodes = 0
env = os.environ
for mode in options.mode:
for arch in options.arch:
print ">>> running tests for %s.%s" % (arch, mode)
shell = workspace + '/' + options.outdir + '/' + arch + '.' + mode + "/d8"
shellpath = workspace + '/' + options.outdir + '/' + arch + '.' + mode
env['LD_LIBRARY_PATH'] = shellpath + '/lib.target'
shell = shellpath + "/d8"
child = subprocess.Popen(' '.join(args_for_children +
['--arch=' + arch] +
['--mode=' + mode] +
['--shell=' + shell]),
shell=True,
cwd=workspace)
cwd=workspace,
env=env)
returncodes += child.wait()
return returncodes