| 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 # TODO(robertm): those should not be necessary once we go -std=c99 | 8 # TODO(robertm): those should not be necessary once we go -std=c99 |
| 9 env.FilterOut(CFLAGS=['-pedantic']) | 9 env.FilterOut(CFLAGS=['-pedantic']) |
| 10 env.FilterOut(CCFLAGS=['-pedantic']) | 10 env.FilterOut(CCFLAGS=['-pedantic']) |
| 11 | 11 |
| 12 manifest_good_sources = env.ComponentObject('manifest_good.cc'), | 12 manifest_good_sources = env.ComponentObject('manifest_good.cc'), |
| 13 | 13 |
| 14 manifest_good_target = ('manifest_good_%s.nexe' % | 14 manifest_good_target = ('manifest_good_%s' % |
| 15 env.get('TARGET_FULLARCH')) | 15 env.get('TARGET_FULLARCH')) |
| 16 env.ComponentProgram(manifest_good_target, | 16 env.ComponentProgram(manifest_good_target, |
| 17 [manifest_good_sources], | 17 [manifest_good_sources], |
| 18 EXTRA_LIBS=['${PPAPI_LIBS}', | 18 EXTRA_LIBS=['${PPAPI_LIBS}', |
| 19 'ppapi_test_lib', | 19 'ppapi_test_lib', |
| 20 'pthread', | 20 'pthread', |
| 21 'platform', | 21 'platform', |
| 22 'gio']) | 22 'gio']) |
| 23 | 23 |
| 24 manifest_bad_sources = env.ComponentObject('manifest_bad.cc'), | 24 manifest_bad_sources = env.ComponentObject('manifest_bad.cc'), |
| 25 | 25 |
| 26 manifest_bad_target = ('manifest_bad_%s.nexe' % | 26 manifest_bad_target = ('manifest_bad_%s' % |
| 27 env.get('TARGET_FULLARCH')) | 27 env.get('TARGET_FULLARCH')) |
| 28 env.ComponentProgram(manifest_bad_target, | 28 env.ComponentProgram(manifest_bad_target, |
| 29 [manifest_bad_sources], | 29 [manifest_bad_sources], |
| 30 EXTRA_LIBS=['${PPAPI_LIBS}', | 30 EXTRA_LIBS=['${PPAPI_LIBS}', |
| 31 'ppapi_test_lib', | 31 'ppapi_test_lib', |
| 32 'pthread', | 32 'pthread', |
| 33 'platform', | 33 'platform', |
| 34 'gio']) | 34 'gio']) |
| 35 | 35 |
| 36 env.Publish(manifest_good_target, 'run', [ | 36 env.Publish(manifest_good_target, 'run', [ |
| 37 'manifest.html', | 37 'manifest.html', |
| 38 manifest_bad_target, | 38 manifest_bad_target, |
| 39 'manifest_top.nmf', | 39 'manifest_top.nmf', |
| 40 'manifest_subdir.nmf', | 40 'manifest_subdir.nmf', |
| 41 ('${SCONSTRUCT_DIR}/tests/ppapi_browser/progress_events/' + | 41 ('${SCONSTRUCT_DIR}/tests/ppapi_browser/progress_events/' + |
| 42 'ppapi_progress_events.js'), | 42 'ppapi_progress_events.js'), |
| 43 '${SCONSTRUCT_DIR}/tools/browser_tester/browserdata/nacltest.js', | 43 '${SCONSTRUCT_DIR}/tools/browser_tester/browserdata/nacltest.js', |
| 44 ]) | 44 ]) |
| 45 | 45 |
| 46 node = env.PPAPIBrowserTester( | 46 node = env.PPAPIBrowserTester( |
| 47 'manifest_browser_test.out', | 47 'manifest_browser_test.out', |
| 48 url='manifest.html', | 48 url='manifest.html', |
| 49 files=env.ExtractPublishedFiles(manifest_good_target), | 49 files=env.ExtractPublishedFiles(manifest_good_target), |
| 50 args=['--map_file', | 50 args=['--map_file', |
| 51 'subdir/manifest_subdir.nmf', | 51 'subdir/manifest_subdir.nmf', |
| 52 env.File('${STAGING_DIR}/manifest_subdir.nmf'), | 52 env.File('${STAGING_DIR}/manifest_subdir.nmf'), |
| 53 # the 'good' nexe in the root directory will fail. | 53 # the 'good' nexe in the root directory will fail. |
| 54 '--map_file', | 54 '--map_file', |
| 55 manifest_good_target, | 55 manifest_good_target + env['PROGSUFFIX'], |
| 56 env.File('${STAGING_DIR}/' + manifest_bad_target), | 56 env.File('${STAGING_DIR}/%s${PROGSUFFIX}' % manifest_bad_target), |
| 57 # the 'good' nexe in the subdirectory will succeed. | 57 # the 'good' nexe in the subdirectory will succeed. |
| 58 '--map_file', | 58 '--map_file', |
| 59 'subdir/' + manifest_good_target, | 59 'subdir/' + manifest_good_target + env['PROGSUFFIX'], |
| 60 env.File('${STAGING_DIR}/' + manifest_good_target)]) | 60 env.File('${STAGING_DIR}/%s${PROGSUFFIX}' % manifest_good_target)]) |
| 61 | 61 |
| 62 env.AddNodeToTestSuite(node, | 62 env.AddNodeToTestSuite(node, |
| 63 ['chrome_browser_tests'], | 63 ['chrome_browser_tests'], |
| 64 'run_manifest_browser_test', | 64 'run_manifest_browser_test', |
| 65 is_broken=env.PPAPIBrowserTesterIsBroken()) | 65 is_broken=env.PPAPIBrowserTesterIsBroken()) |
| OLD | NEW |