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 # Manual testing with localhost:5103/scons-out/.../staging/ppapi_bad.html: | 6 # Manual testing with localhost:5103/scons-out/.../staging/ppapi_bad.html: |
7 # scons --mode=nacl ppapi_bad | 7 # scons --mode=nacl ppapi_bad |
8 # Automatic testing: | 8 # Automatic testing: |
9 # scons run_ppapi_bad_browser_test | 9 # scons run_ppapi_bad_browser_test |
10 # | 10 # |
(...skipping 12 matching lines...) Expand all Loading... |
23 env.File('${SCONSTRUCT_DIR}/tests/ppapi_browser/progress_events/' + | 23 env.File('${SCONSTRUCT_DIR}/tests/ppapi_browser/progress_events/' + |
24 'ppapi_progress_events.js'), | 24 'ppapi_progress_events.js'), |
25 env.File('${SCONSTRUCT_DIR}/tools/browser_tester/browserdata/nacltest.js') | 25 env.File('${SCONSTRUCT_DIR}/tools/browser_tester/browserdata/nacltest.js') |
26 ] | 26 ] |
27 ppapi_bad = env.Replicate('${STAGING_DIR}', ppapi_bad_files) | 27 ppapi_bad = env.Replicate('${STAGING_DIR}', ppapi_bad_files) |
28 | 28 |
29 | 29 |
30 # Compile all nexes embedded into the above html | 30 # Compile all nexes embedded into the above html |
31 for kind in [ 'ppp_initialize', 'no_ppp_instance', 'ppp_instance_didcreate' ]: | 31 for kind in [ 'ppp_initialize', 'no_ppp_instance', 'ppp_instance_didcreate' ]: |
32 bad_nmf = 'ppapi_bad_%s.nmf' % kind | 32 bad_nmf = 'ppapi_bad_%s.nmf' % kind |
33 bad_nexe = ('ppapi_bad_%s_%s.nexe' % (kind, env.get('TARGET_FULLARCH'))) | 33 bad_nexe = ('ppapi_bad_%s_%s' % (kind, env.get('TARGET_FULLARCH'))) |
34 env.ComponentProgram(bad_nexe, | 34 env.ComponentProgram(bad_nexe, |
35 ['ppapi_bad_%s.cc' % kind], | 35 ['ppapi_bad_%s.cc' % kind], |
36 EXTRA_LIBS=['${PPAPI_LIBS}', | 36 EXTRA_LIBS=['${PPAPI_LIBS}', |
37 'platform', | 37 'platform', |
38 'pthread', | 38 'pthread', |
39 'gio']) | 39 'gio']) |
40 | 40 |
41 env.Publish(bad_nexe, 'run', [bad_nmf]) | 41 env.Publish(bad_nexe, 'run', [bad_nmf]) |
42 ppapi_bad_files.extend(env.ExtractPublishedFiles(bad_nexe)) | 42 ppapi_bad_files.extend(env.ExtractPublishedFiles(bad_nexe)) |
43 env.Depends(ppapi_bad, env.Alias(bad_nexe)) | 43 env.Depends(ppapi_bad, env.Alias(bad_nexe)) |
44 | 44 |
45 # "scons --mode=nacl ppapi_bad" will publish the html and all of its | 45 # "scons --mode=nacl ppapi_bad" will publish the html and all of its |
46 # dependencies to scons-out. | 46 # dependencies to scons-out. |
47 env.Alias('ppapi_bad', ppapi_bad) | 47 env.Alias('ppapi_bad', ppapi_bad) |
48 | 48 |
49 node = env.PPAPIBrowserTester( | 49 node = env.PPAPIBrowserTester( |
50 'ppapi_bad_browser_test.out', | 50 'ppapi_bad_browser_test.out', |
51 url='ppapi_bad.html', | 51 url='ppapi_bad.html', |
52 files=[ env.File(f) for f in ppapi_bad_files ], | 52 files=[ env.File(f) for f in ppapi_bad_files ], |
53 args=['--allow_404']) | 53 args=['--allow_404']) |
54 | 54 |
55 env.AddNodeToTestSuite(node, | 55 env.AddNodeToTestSuite(node, |
56 ['chrome_browser_tests'], | 56 ['chrome_browser_tests'], |
57 'run_ppapi_bad_browser_test', | 57 'run_ppapi_bad_browser_test', |
58 is_broken=env.PPAPIBrowserTesterIsBroken()) | 58 is_broken=env.PPAPIBrowserTesterIsBroken()) |
OLD | NEW |