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