| OLD | NEW |
| (Empty) |
| 1 # -*- python -*- | |
| 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 | |
| 4 # found in the LICENSE file. | |
| 5 | |
| 6 Import('env') | |
| 7 | |
| 8 # TODO(robertm): those should not be necessary once we go -std=c99 | |
| 9 env.FilterOut(CFLAGS=['-pedantic']) | |
| 10 env.FilterOut(CCFLAGS=['-pedantic']) | |
| 11 | |
| 12 basic_obj_sources = env.ComponentObject('basic_object.cc'), | |
| 13 | |
| 14 basic_obj_target = 'ppapi_basic_object_%s' % env.get('TARGET_FULLARCH') | |
| 15 env.Alias('ppapi_basic_object${PROGSUFFIX}', | |
| 16 ['$STAGING_DIR/%s${PROGSUFFIX}' % basic_obj_target]) | |
| 17 basic_object_nexe = env.ComponentProgram(basic_obj_target, | |
| 18 [basic_obj_sources], | |
| 19 EXTRA_LIBS=['${PPAPI_LIBS}']) | |
| 20 | |
| 21 # Note that the html and a .nmf manifest is required to run this program. | |
| 22 dest_copy = env.Replicate('$STAGING_DIR', | |
| 23 ['basic_object.html', | |
| 24 'basic_object.nmf', | |
| 25 'user_main.nmf', | |
| 26 env.File('${SCONSTRUCT_DIR}/tools/browser_tester/' | |
| 27 'browserdata/nacltest.js')]) | |
| 28 env.Depends(basic_obj_target, dest_copy) | |
| 29 | |
| 30 user_main_target = 'ppapi_user_main_%s' % env.get('TARGET_FULLARCH') | |
| 31 env.Alias('ppapi_user_main${PROGSUFFIX}', | |
| 32 ['$STAGING_DIR/%s${PROGSUFFIX}' % user_main_target]) | |
| 33 user_main_nexe = env.ComponentProgram(user_main_target, | |
| 34 [basic_obj_sources, 'user_main.cc',], | |
| 35 EXTRA_LIBS=['${PPAPI_LIBS}']) | |
| 36 | |
| 37 env.Depends(user_main_target, dest_copy) | |
| 38 | |
| 39 node = env.PPAPIBrowserTester( | |
| 40 'ppapi_basic_object_browser_test.out', | |
| 41 url='basic_object.html', | |
| 42 files=[basic_object_nexe, | |
| 43 user_main_nexe, | |
| 44 env.File('basic_object.html'), | |
| 45 env.File('basic_object.nmf'), | |
| 46 env.File('user_main.nmf')], | |
| 47 args=['--enable_experimental_js']) | |
| 48 | |
| 49 env.AddNodeToTestSuite(node, | |
| 50 ['chrome_browser_tests'], | |
| 51 'run_ppapi_basic_object_browser_test', | |
| 52 is_broken=env.PPAPIBrowserTesterIsBroken()) | |
| OLD | NEW |