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