diff options
author | ncbray@chromium.org <ncbray@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-09 00:00:06 +0000 |
---|---|---|
committer | ncbray@chromium.org <ncbray@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-09 00:00:06 +0000 |
commit | 9904e929b2642d84e90769ec7d0bce6f2ade8b2a (patch) | |
tree | 21e1771b6a652316cac1dbc90cce2b90d6fbd1c6 /ppapi/native_client/chrome_main.scons | |
parent | 89886fa36bd495d33bcb1dab77ebd1b0aaa84ad2 (diff) | |
download | chromium_src-9904e929b2642d84e90769ec7d0bce6f2ade8b2a.zip chromium_src-9904e929b2642d84e90769ec7d0bce6f2ade8b2a.tar.gz chromium_src-9904e929b2642d84e90769ec7d0bce6f2ade8b2a.tar.bz2 |
Clean up NaCl's SCons build.
The change involved deleting several dead *.scons files, eliminating a dead
dependancy on a script that downloaded Chrome binaries, and unwinding a
nonstandard use of Sconscript to include a file.
BUG= http://code.google.com/p/chromium/issues/detail?id=154400
Review URL: https://chromiumcodereview.appspot.com/11079003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160748 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/native_client/chrome_main.scons')
-rw-r--r-- | ppapi/native_client/chrome_main.scons | 52 |
1 files changed, 14 insertions, 38 deletions
diff --git a/ppapi/native_client/chrome_main.scons b/ppapi/native_client/chrome_main.scons index 36b989e..8d72327 100644 --- a/ppapi/native_client/chrome_main.scons +++ b/ppapi/native_client/chrome_main.scons @@ -52,7 +52,6 @@ ppapi_scons_files['irt_variant_test_scons_files'] = ExtendFileList( # Disabled by Brad Chen 4 Sep to try to green Chromium # nacl_integration tests #'tests/nacl_browser/fault_injection/nacl.scons', - 'tests/nacl.scons', 'tests/nacl_browser/pnacl_client_translator/nacl.scons', ]) @@ -84,44 +83,30 @@ def GetHeadlessPrefix(env): pre_base_env.AddMethod(GetHeadlessPrefix) -pre_base_env['CHROME_DOWNLOAD_DIR'] = \ - pre_base_env.Dir(ARGUMENTS.get('chrome_binaries_dir', '#chromebinaries')) +# A fake file to depend on if a path to Chrome is not specified. +no_browser = pre_base_env.File('chrome_browser_path_not_specified') -def ChromeBinaryArch(env): - arch = env['BUILD_FULLARCH'] - # Currently there are no 64-bit Chrome binaries for Windows or Mac OS X. - if (env.Bit('host_windows') or env.Bit('host_mac')) and arch == 'x86-64': - arch = 'x86-32' - return arch -pre_base_env.AddMethod(ChromeBinaryArch) +# SCons attempts to run a test that depends on "no_browser", detect this at +# runtime and cause a build error. +def NoBrowserError(target, source, env): + print target, source, env + print ("***\nYou need to specificy chrome_browser_path=... on the " + + "command line to run these tests.\n***\n") + return 1 +pre_base_env.Append(BUILDERS = { + 'NoBrowserError': Builder(action=NoBrowserError) +}) -def DownloadedChromeBinary(env): - if env.Bit('host_linux'): - os_name = 'linux' - binary = 'chrome' - elif env.Bit('host_windows'): - os_name = 'windows' - binary = 'chrome.exe' - elif env.Bit('host_mac'): - os_name = 'mac' - binary = 'Chromium.app/Contents/MacOS/Chromium' - else: - raise Exception('Unsupported OS') - - arch = env.ChromeBinaryArch() - return env.File(os.path.join('${CHROME_DOWNLOAD_DIR}', - '%s_%s' % (os_name, arch), binary)) - -pre_base_env.AddMethod(DownloadedChromeBinary) +pre_base_env.NoBrowserError([no_browser], []) def ChromeBinary(env): if 'chrome_browser_path' in ARGUMENTS: return env.File(env.SConstructAbsPath(ARGUMENTS['chrome_browser_path'])) else: - return env.DownloadedChromeBinary() + return no_browser pre_base_env.AddMethod(ChromeBinary) @@ -529,15 +514,6 @@ def PPAPIBrowserTester(env, '--url', url, # Fail if there is no response for X seconds. '--timeout', str(timeout)] - if not env.Bit('disable_dynamic_plugin_loading'): - command.extend(['--ppapi_plugin', env['TRUSTED_ENV'].GetPPAPIPluginPath()]) - command.extend(['--sel_ldr', env.GetSelLdr()]) - bootstrap, _ = env.GetBootstrap() - if bootstrap is not None: - command.extend(['--sel_ldr_bootstrap', bootstrap]) - if (not env.Bit('disable_dynamic_plugin_loading') or - env.Bit('override_chrome_irt')): - command.extend(['--irt_library', env.GetIrtNexe(chrome_irt=True)]) for dep_file in files: command.extend(['--file', dep_file]) for extension in extensions: |