Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # -*- python -*- | 1 # -*- python -*- |
| 2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 Import('env') | 6 Import('env') |
| 7 | 7 |
| 8 | 8 |
| 9 env.ComponentLibrary('testrunner', ['test_runner.c']) | 9 env.ComponentLibrary('testrunner', ['test_runner.c']) |
| 10 | 10 |
| 11 | 11 |
| 12 if env.Bit('bitcode'): | 12 if env.Bit('bitcode'): |
| 13 # The test is disabled for ARM/PNaCl because dynamic_load_test.nexe | 13 # The test is disabled for ARM/PNaCl because dynamic_load_test.nexe |
| 14 # was disabled for ARM/PNaCl. TODO(mseaborn): Re-enable both. | 14 # was disabled for ARM/PNaCl. TODO(mseaborn): Re-enable both. |
| 15 Return() | 15 Return() |
| 16 | 16 |
| 17 arch_suffix = '_%s.nexe' % env.get('TARGET_FULLARCH') | 17 arch_suffix = '_%s' % env.get('TARGET_FULLARCH') |
| 18 dest_copy = env.Replicate('$STAGING_DIR', 'test_runner.html') | 18 dest_copy = env.Replicate('$STAGING_DIR', 'test_runner.html') |
| 19 env.Replicate('$STAGING_DIR', | 19 env.Replicate('$STAGING_DIR', |
| 20 '${SCONSTRUCT_DIR}/tools/browser_tester/browserdata/nacltest.js') | 20 '${SCONSTRUCT_DIR}/tools/browser_tester/browserdata/nacltest.js') |
| 21 test_files = [ | 21 test_files = [ |
| 22 env.File('$STAGING_DIR/nacltest.js'), | 22 env.File('$STAGING_DIR/nacltest.js'), |
| 23 env.File('$STAGING_DIR/dynamic_load_test.nmf'), | 23 env.File('$STAGING_DIR/dynamic_load_test.nmf'), |
| 24 env.File('$STAGING_DIR/dynamic_load_test' + arch_suffix), | 24 env.File('$STAGING_DIR/dynamic_load_test%s${PROGSUFFIX}' % arch_suffix), |
|
Nick Bray
2011/06/23 18:32:24
Interpolate both the same way?
pdox
2011/06/23 20:42:58
Done.
| |
| 25 env.File('$STAGING_DIR/dynamic_modify_test.nmf'), | 25 env.File('$STAGING_DIR/dynamic_modify_test.nmf'), |
| 26 env.File('$STAGING_DIR/dynamic_modify_test' + arch_suffix), | 26 env.File('$STAGING_DIR/dynamic_modify_test%s${PROGSUFFIX}' % arch_suffix), |
| 27 env.File('$STAGING_DIR/imc_shm_mmap_test.nmf'), | 27 env.File('$STAGING_DIR/imc_shm_mmap_test.nmf'), |
| 28 env.File('$STAGING_DIR/imc_shm_mmap_test' + arch_suffix), | 28 env.File('$STAGING_DIR/imc_shm_mmap_test%s${PROGSUFFIX}' % arch_suffix), |
| 29 ] | 29 ] |
| 30 # These are not true dependencies: They are not needed for | 30 # These are not true dependencies: They are not needed for |
| 31 # test_runner.html to be replicated to "staging", but they are needed | 31 # test_runner.html to be replicated to "staging", but they are needed |
| 32 # for test_runner.html to work when run. | 32 # for test_runner.html to work when run. |
| 33 env.Depends(dest_copy, test_files) | 33 env.Depends(dest_copy, test_files) |
| 34 env.Alias('test_runner.html', dest_copy) | 34 env.Alias('test_runner.html', dest_copy) |
| 35 | 35 |
| 36 node = env.BrowserTester( | 36 node = env.BrowserTester( |
| 37 'my_browser_test.out', url='test_runner.html', | 37 'my_browser_test.out', url='test_runner.html', |
| 38 files=[env.File('test_runner.html')] + test_files) | 38 files=[env.File('test_runner.html')] + test_files) |
| 39 # Disabling test on mac, see: | 39 # Disabling test on mac, see: |
| 40 # http://code.google.com/p/nativeclient/issues/detail?id=1170 | 40 # http://code.google.com/p/nativeclient/issues/detail?id=1170 |
| 41 if 'TRUSTED_ENV' in env and not env['TRUSTED_ENV'].Bit('mac'): | 41 if 'TRUSTED_ENV' in env and not env['TRUSTED_ENV'].Bit('mac'): |
| 42 env.AddNodeToTestSuite(node, ['browser_tests'], 'run_inbrowser_test_runner') | 42 env.AddNodeToTestSuite(node, ['browser_tests'], 'run_inbrowser_test_runner') |
| 43 | 43 |
| 44 node = env.PPAPIBrowserTester( | 44 node = env.PPAPIBrowserTester( |
| 45 'inbrowser_test_runner_chrome.out', url='test_runner.html', | 45 'inbrowser_test_runner_chrome.out', url='test_runner.html', |
| 46 files=[env.File('test_runner.html')] + test_files, | 46 files=[env.File('test_runner.html')] + test_files, |
| 47 args=['--enable_experimental_js']) | 47 args=['--enable_experimental_js']) |
| 48 | 48 |
| 49 env.AddNodeToTestSuite(node, ['chrome_browser_tests'], | 49 env.AddNodeToTestSuite(node, ['chrome_browser_tests'], |
| 50 'run_inbrowser_test_runner_chrome', | 50 'run_inbrowser_test_runner_chrome', |
| 51 is_flaky=True, # Don't subject Chrome to our problems. | 51 is_flaky=True, # Don't subject Chrome to our problems. |
| 52 is_broken=env.PPAPIBrowserTesterIsBroken()) | 52 is_broken=env.PPAPIBrowserTesterIsBroken()) |
| OLD | NEW |