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 test demonstrates sample usage of ppapi_test_lib. | 6 # This test demonstrates sample usage of ppapi_test_lib. |
7 # | 7 # |
8 # These ppapi_test_lib/ headers should be used by the test setup: | 8 # These ppapi_test_lib/ headers should be used by the test setup: |
9 # test_interface.h - test interface + setup to be implemented by the tester. | 9 # test_interface.h - test interface + setup to be implemented by the tester. |
10 # get_browser_interface.h - provides getters for proxy-supported interfaces. | 10 # get_browser_interface.h - provides getters for proxy-supported interfaces. |
11 # | 11 # |
12 # ppapi_test_example.cc - sample implementation test_interface.h. | 12 # ppapi_test_example.cc - sample implementation test_interface.h. |
13 # ppapi_test_example.html - sample test driver that uses scripting. | 13 # ppapi_test_example.html - sample test driver that uses scripting. |
14 # ppapi_test_example.js - setup for sample test driver. | 14 # ppapi_test_example.js - setup for sample test driver. |
15 # ppapi_test_example.nmf - sample manifest for platform-specific nexes. | 15 # ppapi_test_example.nmf - sample manifest for platform-specific nexes. |
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_test_example/') | |
22 | 20 |
23 nexe = 'ppapi_test_example_%s' % env.get('TARGET_FULLARCH') | 21 nexe = 'ppapi_test_example_%s' % env.get('TARGET_FULLARCH') |
24 env.Alias('ppapi_test_example${PROGSUFFIX}', | 22 env.Alias('ppapi_test_example${PROGSUFFIX}', |
25 ['$STAGING_DIR/%s${PROGSUFFIX}' % nexe]) | 23 ['$STAGING_DIR/%s${PROGSUFFIX}' % nexe]) |
26 | 24 |
27 ppapi_test_example_nexe = env.ComponentProgram( | 25 ppapi_test_example_nexe = env.ComponentProgram( |
28 nexe, | 26 nexe, |
29 ['ppapi_test_example.cc'], | 27 ['ppapi_test_example.cc'], |
30 EXTRA_LIBS=['${PPAPI_LIBS}', | 28 EXTRA_LIBS=['${PPAPI_LIBS}', |
31 'ppapi_test_lib', | 29 'ppapi_test_lib', |
32 'platform', # for CHECK | 30 'platform', # for CHECK |
33 'pthread', | 31 'pthread', |
34 'gio', | 32 'gio', |
35 ]) | 33 ]) |
36 | 34 |
37 env.Publish(nexe, 'run', | 35 env.Publish(nexe, 'run', |
38 ['ppapi_test_example.html', | 36 ['ppapi_test_example.html', |
| 37 'ppapi_test_example.nmf', |
39 'ppapi_test_example.js']) | 38 'ppapi_test_example.js']) |
40 | 39 |
41 node = env.PPAPIBrowserTester('ppapi_test_example_browser_test.out', | 40 node = env.PPAPIBrowserTester('ppapi_test_example_browser_test.out', |
42 url='ppapi_test_example.html', | 41 url='ppapi_test_example.html', |
43 nmf='${TEST_DIR}/ppapi_test_example.nmf', | |
44 files=env.ExtractPublishedFiles(nexe)) | 42 files=env.ExtractPublishedFiles(nexe)) |
45 | 43 |
46 env.AddNodeToTestSuite(node, | 44 env.AddNodeToTestSuite(node, |
47 ['chrome_browser_tests'], | 45 ['chrome_browser_tests'], |
48 'run_ppapi_test_example_browser_test', | 46 'run_ppapi_test_example_browser_test', |
49 is_broken=env.PPAPIBrowserTesterIsBroken()) | 47 is_broken=env.PPAPIBrowserTesterIsBroken()) |
OLD | NEW |