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 srpc_hw_libs = ['srpc', 'platform', 'gio', 'imc', 'imc_syscalls'] | 8 srpc_hw_libs = ['srpc', 'platform', 'gio', 'imc', 'imc_syscalls'] |
9 | 9 |
10 srpc_hw_obj = env.ComponentObject('srpc_hw.o', 'srpc_hw.c') | 10 srpc_hw_obj = env.ComponentObject('srpc_hw.o', 'srpc_hw.c') |
11 srpc_hw_nexe_name = 'srpc_hw_%s' % env.get('TARGET_FULLARCH') | 11 srpc_hw_nexe_name = 'srpc_hw_%s' % env.get('TARGET_FULLARCH') |
12 srpc_hw_nexe = env.ComponentProgram(srpc_hw_nexe_name, | 12 srpc_hw_nexe = env.ComponentProgram(srpc_hw_nexe_name, |
13 srpc_hw_obj, | 13 srpc_hw_obj, |
14 EXTRA_LIBS=srpc_hw_libs + [ | 14 EXTRA_LIBS=srpc_hw_libs + [ |
15 '${PTHREAD_LIBS}', | 15 '${PTHREAD_LIBS}', |
16 '${NON_PPAPI_BROWSER_LIBS}']) | 16 '${NON_PPAPI_BROWSER_LIBS}']) |
17 | 17 |
18 env.Publish(srpc_hw_nexe_name, 'run', | 18 env.Publish(srpc_hw_nexe_name, 'run', |
19 ['srpc_hw.html', | 19 ['srpc_hw.html', |
20 'srpc_hw.nmf', | |
21 'srpc_hw_data.html']) | 20 'srpc_hw_data.html']) |
22 | 21 |
23 srpc_hw_nonbrowser = env.ComponentProgram('srpc_hw_nonbrowser', | 22 srpc_hw_nonbrowser = env.ComponentProgram('srpc_hw_nonbrowser', |
24 srpc_hw_obj, | 23 srpc_hw_obj, |
25 EXTRA_LIBS=srpc_hw_libs + [ | 24 EXTRA_LIBS=srpc_hw_libs + [ |
26 '${PTHREAD_LIBS}', | 25 '${PTHREAD_LIBS}', |
27 '${NONIRT_LIBS}']) | 26 '${NONIRT_LIBS}']) |
28 | 27 |
29 node = env.SelUniversalTest( | 28 node = env.SelUniversalTest( |
30 'srpc_hw_test.out', | 29 'srpc_hw_test.out', |
31 srpc_hw_nonbrowser, | 30 srpc_hw_nonbrowser, |
32 sel_universal_flags=['--command_file', env.File('srpc_hw_test.stdin')], | 31 sel_universal_flags=['--command_file', env.File('srpc_hw_test.stdin')], |
33 stdout_golden=env.File('srpc_hw_test.stdout'), | 32 stdout_golden=env.File('srpc_hw_test.stdout'), |
34 ) | 33 ) |
35 env.AddNodeToTestSuite(node, | 34 env.AddNodeToTestSuite(node, |
36 ['small_tests'], | 35 ['small_tests'], |
37 'run_srpc_hw_test') | 36 'run_srpc_hw_test') |
38 | 37 |
39 # chrome_browser_tests | 38 # chrome_browser_tests |
40 | 39 |
41 node = env.PPAPIBrowserTester( | 40 node = env.PPAPIBrowserTester( |
42 'srpc_hw_browser_test.out', | 41 'srpc_hw_browser_test.out', |
43 url='srpc_hw.html', | 42 url='srpc_hw.html', |
| 43 nmfs=['srpc_hw.nmf'], |
44 files=env.ExtractPublishedFiles(srpc_hw_nexe_name), | 44 files=env.ExtractPublishedFiles(srpc_hw_nexe_name), |
45 args=['--debug', '--enable_experimental_js']) | 45 args=['--debug', '--enable_experimental_js']) |
46 | 46 |
47 env.AddNodeToTestSuite(node, | 47 env.AddNodeToTestSuite(node, |
48 ['chrome_browser_tests'], | 48 ['chrome_browser_tests'], |
49 'run_srpc_hw_chrome_browser_test', | 49 'run_srpc_hw_chrome_browser_test', |
50 is_broken=env.PPAPIBrowserTesterIsBroken()) | 50 is_broken=env.PPAPIBrowserTesterIsBroken()) |
51 | 51 |
52 # A test that manifests can be coded by data URIs. | 52 # A test that manifests can be coded by data URIs. |
53 node = env.PPAPIBrowserTester( | 53 node = env.PPAPIBrowserTester( |
54 'srpc_hw_data_browser_test.out', | 54 'srpc_hw_data_browser_test.out', |
55 url='srpc_hw_data.html', | 55 url='srpc_hw_data.html', |
| 56 nmfs=['srpc_hw.nmf'], |
56 files=env.ExtractPublishedFiles(srpc_hw_nexe_name), | 57 files=env.ExtractPublishedFiles(srpc_hw_nexe_name), |
57 # have to hardcode the port so the data URI can encode an absolute path | 58 # have to hardcode the port so the data URI can encode an absolute path |
58 args=['--debug', '--enable_experimental_js']) | 59 args=['--debug', '--enable_experimental_js']) |
59 | 60 |
60 env.AddNodeToTestSuite(node, | 61 env.AddNodeToTestSuite(node, |
61 ['chrome_browser_tests'], | 62 ['chrome_browser_tests'], |
62 'run_srpc_hw_data_chrome_browser_test', | 63 'run_srpc_hw_data_chrome_browser_test', |
63 is_broken=env.PPAPIBrowserTesterIsBroken()) | 64 is_broken=env.PPAPIBrowserTesterIsBroken() or |
| 65 env.Bit('nacl_glibc')) |
OLD | NEW |