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 env.Replace(TEST_DIR='${SOURCE_ROOT}/ppapi/native_client/tests/ppapi_browser/' + | |
12 'manifest') | |
13 | 11 |
14 manifest_good_sources = env.ComponentObject('manifest_good.cc'), | 12 manifest_good_sources = env.ComponentObject('manifest_good.cc'), |
15 | 13 |
16 manifest_good_target = ('manifest_good_%s' % | 14 manifest_good_target = ('manifest_good_%s' % |
17 env.get('TARGET_FULLARCH')) | 15 env.get('TARGET_FULLARCH')) |
18 env.ComponentProgram(manifest_good_target, | 16 env.ComponentProgram(manifest_good_target, |
19 [manifest_good_sources], | 17 [manifest_good_sources], |
20 EXTRA_LIBS=['${PPAPI_LIBS}', | 18 EXTRA_LIBS=['${PPAPI_LIBS}', |
21 'ppapi_test_lib', | 19 'ppapi_test_lib', |
22 'pthread', | 20 'pthread', |
23 'platform', | 21 'platform', |
24 'gio']) | 22 'gio']) |
25 | 23 |
26 manifest_bad_sources = env.ComponentObject('manifest_bad.cc'), | 24 manifest_bad_sources = env.ComponentObject('manifest_bad.cc'), |
27 | 25 |
28 manifest_bad_target = ('manifest_bad_%s' % | 26 manifest_bad_target = ('manifest_bad_%s' % |
29 env.get('TARGET_FULLARCH')) | 27 env.get('TARGET_FULLARCH')) |
30 env.ComponentProgram(manifest_bad_target, | 28 env.ComponentProgram(manifest_bad_target, |
31 [manifest_bad_sources], | 29 [manifest_bad_sources], |
32 EXTRA_LIBS=['${PPAPI_LIBS}', | 30 EXTRA_LIBS=['${PPAPI_LIBS}', |
33 'ppapi_test_lib', | 31 'ppapi_test_lib', |
34 'pthread', | 32 'pthread', |
35 'platform', | 33 'platform', |
36 'gio']) | 34 'gio']) |
37 | 35 |
38 env.Publish(manifest_good_target, 'run', [ | 36 env.Publish(manifest_good_target, 'run', [ |
39 'manifest.html', | 37 'manifest.html', |
40 manifest_bad_target, | 38 manifest_bad_target, |
| 39 'manifest_top.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 file_mapping = [] | |
47 if env.Bit('nacl_glibc'): | |
48 file_mapping.append( | |
49 ('subdir/runnable-ld.so',env.File('${NACL_SDK_LIB}/runnable-ld.so'))) | |
50 file_mapping += [ | |
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 node = env.PPAPIBrowserTester( | 46 node = env.PPAPIBrowserTester( |
61 'manifest_browser_test.out', | 47 'manifest_browser_test.out', |
62 url='manifest.html', | 48 url='manifest.html', |
63 nmf=['${TEST_DIR}/manifest_top.nmf', '${TEST_DIR}/manifest_subdir.nmf'], | |
64 files=env.ExtractPublishedFiles(manifest_good_target), | 49 files=env.ExtractPublishedFiles(manifest_good_target), |
65 map_files=file_mapping) | 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))]) |
66 | 59 |
67 env.AddNodeToTestSuite(node, | 60 env.AddNodeToTestSuite(node, |
68 ['chrome_browser_tests'], | 61 ['chrome_browser_tests'], |
69 'run_manifest_browser_test', | 62 'run_manifest_browser_test', |
70 is_broken=env.PPAPIBrowserTesterIsBroken()) | 63 is_broken=env.PPAPIBrowserTesterIsBroken()) |
OLD | NEW |