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 | 6 # This is a C PPAPI |
7 # | 7 # |
8 # ppapi_file_system.html - test driver that loads the nexe and scripts it | 8 # ppapi_file_system.html - test driver that loads the nexe that uses scripting |
9 # ppapi_file_system.nmf - manifest file for serving platform specific nexe binar
y. | 9 # ppapi_file_system.nmf - manifest file for serving platform specific nexe binar
y. |
10 # | 10 # |
11 # ppapi_file_system.cc - implementation of PPP interface and PPP_Instance | 11 # ppapi_file_system.cc - implementation of ppapi_test_lib/test_interface.h |
12 # scriptable_object.c - implementation of the scripting interface | |
13 | 12 |
14 Import('env') | 13 Import('env') |
15 | 14 |
16 env.Prepend(CPPDEFINES=['XP_UNIX']) | 15 env.Prepend(CPPDEFINES=['XP_UNIX']) |
17 | 16 |
18 nexe = 'ppapi_file_system_%s.nexe' % env.get('TARGET_FULLARCH') | 17 nexe = 'ppapi_file_system_%s.nexe' % env.get('TARGET_FULLARCH') |
19 | 18 |
20 env.Alias('ppapi_file_system.nexe', ['$STAGING_DIR/%s' % nexe]) | 19 env.Alias('ppapi_file_system.nexe', ['$STAGING_DIR/%s' % nexe]) |
21 | 20 |
22 ppapi_file_system_nexe = env.ComponentProgram(nexe, | 21 ppapi_file_system_nexe = env.ComponentProgram(nexe, |
23 ['ppapi_file_system.cc', | 22 ['ppapi_file_system.cc'], |
24 'scriptable_object.c'], | 23 EXTRA_LIBS=['${PPAPI_LIBS}', |
25 EXTRA_LIBS=['${PPAPI_LIBS}', | 24 'ppapi_test_lib', |
26 'platform', | 25 'platform', |
27 'gio', | 26 'gio', |
28 'pthread']) | 27 'pthread']) |
29 | 28 env.Publish(nexe, 'run', |
30 # Note that the html is required to run this program. | 29 ['ppapi_file_system.html', |
31 dest_copy = env.Replicate('$STAGING_DIR', | 30 'ppapi_file_system.nmf', |
32 ['ppapi_file_system.html', | 31 'ppapi_file_system.js']) |
33 'ppapi_file_system.nmf', | |
34 env.File('${SCONSTRUCT_DIR}/tools/browser_tester/' | |
35 'browserdata/nacltest.js')] | |
36 ) | |
37 env.Depends(nexe, dest_copy) | |
38 | |
39 node = env.PPAPIBrowserTester('ppapi_file_system_browser_test.out', | 32 node = env.PPAPIBrowserTester('ppapi_file_system_browser_test.out', |
40 url='ppapi_file_system.html', | 33 url='ppapi_file_system.html', |
41 files=[ppapi_file_system_nexe, | 34 files=env.ExtractPublishedFiles(nexe), |
42 env.File('ppapi_file_system.nmf'), | |
43 env.File('ppapi_file_system.html')], | |
44 args=['--enable_experimental_js']) | 35 args=['--enable_experimental_js']) |
45 | 36 |
46 # Disabled for ARM because Chrome binaries for ARM are not available. | 37 # Disabled for ARM because Chrome binaries for ARM are not available. |
47 # TODO(ncbray): Enable this on Windows. | 38 # TODO(ncbray): Enable this on Windows. |
48 tester_is_broken = \ | 39 tester_is_broken = \ |
49 (env.Bit('target_arm') or | 40 (env.Bit('target_arm') or |
50 (env.Bit('host_windows') and | 41 (env.Bit('host_windows') and |
51 not env.Bit('disable_dynamic_plugin_loading'))) | 42 not env.Bit('disable_dynamic_plugin_loading'))) |
52 env.AddNodeToTestSuite(node, | 43 env.AddNodeToTestSuite(node, |
53 ['chrome_browser_tests'], | 44 ['chrome_browser_tests'], |
54 'run_ppapi_file_system_browser_test', | 45 'run_ppapi_file_system_browser_test', |
55 is_broken=tester_is_broken) | 46 is_broken=tester_is_broken) |
OLD | NEW |