From: jkummerow@chromium.org Date: Wed, 31 Aug 2011 14:15:42 +0000 (+0000) Subject: Add support for shared library builds to tools/test-wrapper-gypbuild.py X-Git-Tag: upstream/4.7.83~18603 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f3fc54666ab87ce589983a4a4975bf670fca152b;p=platform%2Fupstream%2Fv8.git 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 --- diff --git a/build/all.gyp b/build/all.gyp index 9c0f05c..b87b1c0 100644 --- a/build/all.gyp +++ b/build/all.gyp @@ -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:*', ], } ] diff --git a/test/cctest/cctest.gyp b/test/cctest/cctest.gyp index c0b5316..5d0cab3 100644 --- a/test/cctest/cctest.gyp +++ b/test/cctest/cctest.gyp @@ -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'], + }], ], }, { diff --git a/tools/test-wrapper-gypbuild.py b/tools/test-wrapper-gypbuild.py index fdf8257..ad5449a 100755 --- a/tools/test-wrapper-gypbuild.py +++ b/tools/test-wrapper-gypbuild.py @@ -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