Skip to content

Commit

Permalink
Support x86_64 Mac for nacl_integration_tests.
Browse files Browse the repository at this point in the history
This enables nacl_integration_tests to run via buildbot_nacl_integration.py
for Mac x86_64. It makes --bits work correctly on Mac, and allows the proper
--bits setting to be automatically detected based on the Chrome browser being
used for testing.

BUG=316401,316715
R=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/67313002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234035 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
mark@chromium.org committed Nov 8, 2013
1 parent aeb6673 commit 36da7ca
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
29 changes: 20 additions & 9 deletions chrome/test/nacl_test_injection/buildbot_chrome_nacl_stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ def BuildAndTest(options):
nacl_dir = os.path.join(src_dir, 'native_client')

# Decide platform specifics.
if options.browser_path:
chrome_filename = options.browser_path
else:
chrome_filename = find_chrome.FindChrome(src_dir, [options.mode])
if chrome_filename is None:
raise Exception('Cannot find a chome binary - specify one with '
'--browser_path?')

env = dict(os.environ)
if sys.platform in ['win32', 'cygwin']:
if options.bits == 64:
Expand All @@ -127,7 +135,18 @@ def BuildAndTest(options):
env['PATH'] += ';' + msvs_path
scons = [python, 'scons.py']
elif sys.platform == 'darwin':
bits = 32
if options.bits == 64:
bits = 64
elif options.bits == 32:
bits = 32
else:
p = subprocess.Popen(['file', chrome_filename], stdout=subprocess.PIPE)
(p_stdout, _) = p.communicate()
assert p.returncode == 0
if p_stdout.find('executable x86_64') >= 0:
bits = 64
else:
bits = 32
scons = [python, 'scons.py']
else:
p = subprocess.Popen(
Expand All @@ -148,14 +167,6 @@ def BuildAndTest(options):
# the entire build step rather than each test (browser_headless=1).
scons = ['xvfb-run', '--auto-servernum', python, 'scons.py']

if options.browser_path:
chrome_filename = options.browser_path
else:
chrome_filename = find_chrome.FindChrome(src_dir, [options.mode])
if chrome_filename is None:
raise Exception('Cannot find a chome binary - specify one with '
'--browser_path?')

if options.jobs > 1:
scons.append('-j%d' % options.jobs)

Expand Down
2 changes: 1 addition & 1 deletion chrome/test/nacl_test_injection/find_chrome.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def FindChrome(src_dir, configs, verbose=False):
'out/%s/chrome' % config,
# Mac Chromium ninja builder
'out/%s/Chromium.app/Contents/MacOS/Chromium' % config,
# Mac release make builder
# Mac release ninja builder
'out/%s/Google Chrome.app/Contents/MacOS/Google Chrome' % config,
# Mac Chromium xcode builder
'xcodebuild/%s/Chromium.app/Contents/MacOS/Chromium' % config,
Expand Down

0 comments on commit 36da7ca

Please sign in to comment.