| 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 | |
| 16 | 15 |
| 17 Import('env') | 16 Import('env') |
| 18 | 17 |
| 19 # http://code.google.com/p/nativeclient/issues/detail?id=2359 | 18 # http://code.google.com/p/nativeclient/issues/detail?id=2359 |
| 20 if env.Bit('bitcode') and env.Bit('nacl_glibc'): | 19 if env.Bit('bitcode') and env.Bit('nacl_glibc'): |
| 21 Return() | 20 Return() |
| 22 | 21 |
| 23 env.Prepend(CPPDEFINES=['XP_UNIX']) | 22 env.Prepend(CPPDEFINES=['XP_UNIX']) |
| 24 env.Replace(TEST_DIR='${SOURCE_ROOT}/ppapi/native_client/tests/' + | 23 env.Replace(TEST_DIR='${SOURCE_ROOT}/ppapi/native_client/tests/' + |
| 25 'ppapi_geturl/') | 24 'ppapi_geturl/') |
| 26 | 25 |
| 27 nexe = 'ppapi_geturl_%s' % env.get('TARGET_FULLARCH') | 26 nexe = 'ppapi_geturl_%s' % env.get('TARGET_FULLARCH') |
| 28 env.Alias('ppapi_geturl${PROGSUFFIX}', | 27 env.Alias('ppapi_geturl${PROGSUFFIX}', |
| 29 ['$STAGING_DIR/%s${PROGSUFFIX}' % nexe]) | 28 ['$STAGING_DIR/%s${PROGSUFFIX}' % nexe]) |
| 30 | 29 |
| 31 ppapi_geturl_nexe = env.ComponentProgram(nexe, | 30 ppapi_geturl_nexe = env.ComponentProgram(nexe, |
| 32 ['nacl_file_main.cc', | 31 ['module.cc', |
| 33 'module.cc', | |
| 34 'ppapi_geturl.cc', | 32 'ppapi_geturl.cc', |
| 35 'url_load_request.cc', | 33 'url_load_request.cc', |
| 36 ], | 34 ], |
| 37 EXTRA_LIBS=[ | 35 EXTRA_LIBS=[ |
| 38 'nacl_file', | |
| 39 'ppruntime', | 36 'ppruntime', |
| 40 'srpc', | 37 'srpc', |
| 41 'imc', | 38 'imc', |
| 42 'imc_syscalls', | 39 'imc_syscalls', |
| 43 'platform', | 40 'platform', |
| 44 'gio', | 41 'gio', |
| 45 '${PTHREAD_LIBS}', | 42 '${PTHREAD_LIBS}', |
| 46 'm', | 43 'm', |
| 47 '${NON_PPAPI_BROWSER_LIBS}'], | 44 '${NON_PPAPI_BROWSER_LIBS}']) |
| 48 EXTRA_LINKFLAGS=['-Wl,--wrap=read', | |
| 49 '-Wl,--wrap=open', | |
| 50 '-Wl,--wrap=lseek', | |
| 51 '-Wl,--wrap=close']) | |
| 52 | 45 |
| 53 env.Publish(nexe, 'run', | 46 env.Publish(nexe, 'run', |
| 54 ['ppapi_geturl.html', | 47 ['ppapi_geturl.html', |
| 55 'ppapi_geturl_success.html']) | 48 'ppapi_geturl_success.html']) |
| 56 | 49 |
| 57 node = env.PPAPIBrowserTester('ppapi_geturl_browser_test.out', | 50 node = env.PPAPIBrowserTester('ppapi_geturl_browser_test.out', |
| 58 url='ppapi_geturl.html', | 51 url='ppapi_geturl.html', |
| 59 nmfs=['${TEST_DIR}/ppapi_geturl.nmf'], | 52 nmfs=['${TEST_DIR}/ppapi_geturl.nmf'], |
| 60 files=env.ExtractPublishedFiles(nexe), | 53 files=env.ExtractPublishedFiles(nexe), |
| 61 args=['--allow_404'], | 54 args=['--allow_404'], |
| 62 ) | 55 ) |
| 63 | 56 |
| 64 env.AddNodeToTestSuite(node, | 57 env.AddNodeToTestSuite(node, |
| 65 ['chrome_browser_tests'], | 58 ['chrome_browser_tests'], |
| 66 'run_ppapi_geturl_browser_test', | 59 'run_ppapi_geturl_browser_test', |
| 67 is_broken=env.PPAPIBrowserTesterIsBroken()) | 60 is_broken=env.PPAPIBrowserTesterIsBroken()) |
| OLD | NEW |