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 # This is a C PPAPI-based version of ../npapi_geturl. | 6 # This is a C PPAPI-based version of ../npapi_geturl. |
7 # | 7 # |
8 # ppapi_geturl.html - test driver that loads the nexe and scripts it | 8 # ppapi_geturl.html - test driver that loads the nexe and scripts it |
9 # ppapi_geturl_success.html - to be url-loaded and displayed w/n driver html | 9 # ppapi_geturl_success.html - to be url-loaded and displayed w/n driver html |
10 # | 10 # |
11 # ppapi_geturl.cc - implementation of PPP interface | 11 # ppapi_geturl.cc - implementation of PPP interface |
12 # module.h/cc - implementation of PPP_Instance interface | 12 # module.h/cc - implementation of PPP_Instance interface |
13 # scriptable_object.h/cc - implementation of the scripting interface | 13 # scriptable_object.h/cc - implementation of the scripting interface |
14 # url_load_request.h/cc - url loading helper | 14 # url_load_request.h/cc - url loading helper |
15 # nacl_file_main.cc - uses main() to test NaClFile interface | 15 # nacl_file_main.cc - uses main() to test NaClFile interface |
16 | 16 |
17 Import('env') | 17 Import('env') |
18 | 18 |
19 env.Prepend(CPPDEFINES=['XP_UNIX']) | 19 env.Prepend(CPPDEFINES=['XP_UNIX']) |
20 env.Replace(TEST_DIR='${SOURCE_ROOT}/ppapi/native_client/tests/' + | |
21 'ppapi_geturl/') | |
22 | 20 |
23 nexe = 'ppapi_geturl_%s' % env.get('TARGET_FULLARCH') | 21 nexe = 'ppapi_geturl_%s' % env.get('TARGET_FULLARCH') |
24 env.Alias('ppapi_geturl${PROGSUFFIX}', | 22 env.Alias('ppapi_geturl${PROGSUFFIX}', |
25 ['$STAGING_DIR/%s${PROGSUFFIX}' % nexe]) | 23 ['$STAGING_DIR/%s${PROGSUFFIX}' % nexe]) |
26 | 24 |
27 ppapi_geturl_nexe = env.ComponentProgram(nexe, | 25 ppapi_geturl_nexe = env.ComponentProgram(nexe, |
28 ['nacl_file_main.cc', | 26 ['nacl_file_main.cc', |
29 'module.cc', | 27 'module.cc', |
30 'ppapi_geturl.cc', | 28 'ppapi_geturl.cc', |
31 'url_load_request.cc', | 29 'url_load_request.cc', |
32 ], | 30 ], |
33 EXTRA_LIBS=[ | 31 EXTRA_LIBS=[ |
34 'nacl_file', | 32 'nacl_file', |
35 'ppruntime', | 33 'ppruntime', |
36 'srpc', | 34 'srpc', |
37 'imc', | 35 'imc', |
38 'imc_syscalls', | 36 'imc_syscalls', |
39 'platform', | 37 'platform', |
40 'gio', | 38 'gio', |
41 '${PTHREAD_LIBS}', | 39 '${PTHREAD_LIBS}', |
42 'm', | 40 'm', |
43 '${NON_PPAPI_BROWSER_LIBS}'], | 41 '${NON_PPAPI_BROWSER_LIBS}'], |
44 EXTRA_LINKFLAGS=['-Wl,--wrap=read', | 42 EXTRA_LINKFLAGS=['-Wl,--wrap=read', |
45 '-Wl,--wrap=open', | 43 '-Wl,--wrap=open', |
46 '-Wl,--wrap=lseek', | 44 '-Wl,--wrap=lseek', |
47 '-Wl,--wrap=close']) | 45 '-Wl,--wrap=close']) |
48 | 46 |
49 env.Publish(nexe, 'run', | 47 env.Publish(nexe, 'run', |
50 ['ppapi_geturl.html', | 48 ['ppapi_geturl.html', |
| 49 'ppapi_geturl.nmf', |
51 'ppapi_geturl_success.html']) | 50 'ppapi_geturl_success.html']) |
52 | 51 |
53 node = env.PPAPIBrowserTester('ppapi_geturl_browser_test.out', | 52 node = env.PPAPIBrowserTester('ppapi_geturl_browser_test.out', |
54 url='ppapi_geturl.html', | 53 url='ppapi_geturl.html', |
55 nmf='${TEST_DIR}/ppapi_geturl.nmf', | |
56 files=env.ExtractPublishedFiles(nexe), | 54 files=env.ExtractPublishedFiles(nexe), |
57 args=['--allow_404'], | 55 args=['--allow_404'], |
58 ) | 56 ) |
59 | 57 |
60 env.AddNodeToTestSuite(node, | 58 env.AddNodeToTestSuite(node, |
61 ['chrome_browser_tests'], | 59 ['chrome_browser_tests'], |
62 'run_ppapi_geturl_browser_test', | 60 'run_ppapi_geturl_browser_test', |
63 is_broken=env.PPAPIBrowserTesterIsBroken() or | 61 is_broken=env.PPAPIBrowserTesterIsBroken() |
64 env.Bit('nacl_glibc')) | 62 ) |
OLD | NEW |