Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / ppapi / native_client / tests / nacl_browser / browser_dynamic_library / nacl.scons
blobaac7fed6c3569a5c5686aec92458dceb4acb0e5c
1 # -*- python -*-
2 # Copyright (c) 2012 The Chromium 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.
6 import os
8 Import('env')
10 if env.Bit('nacl_static_link'):
11   Return()
13 toolchain_libraries = [
14     'libmemusage.so', # Will dlopen this library.
15     ]
17 def make_mappings(libdir, libs):
18   return [(lib, env.File(os.path.join(libdir, lib))) for lib in libs]
20 # Allow resolving a URL to the toolchain/ directory (instead of staging).
21 browser_dlopen_file_mapping = make_mappings('${NACL_SDK_LIB}',
22                                             toolchain_libraries)
24 browser_dlopen_nexe_name = env.ProgramNameForNmf('browser_dlopen_test')
25 browser_dlopen_nexe = env.ComponentProgram(browser_dlopen_nexe_name,
26                                            'browser_dlopen_test.cc',
27                                            EXTRA_LIBS=[
28                                                'ppapi',
29                                                'ppapi_test_lib',
30                                                'platform',
31                                                'dl',
32                                                '${PTHREAD_LIBS}'])
35 env.Publish(browser_dlopen_nexe_name, 'run', ['browser_dlopen_test.html'])
37 browser_dlopen_node = env.PPAPIBrowserTester(
38     'browser_dlopen_test.out', url='browser_dlopen_test.html',
39     files=env.ExtractPublishedFiles(browser_dlopen_nexe_name),
40     nmfs=['browser_dlopen_test.nmf'],
41     map_files=browser_dlopen_file_mapping)
43 env.AddNodeToTestSuite(browser_dlopen_node, ['chrome_browser_tests'],
44                        'run_browser_dlopen_test',
45                        is_broken=env.PPAPIBrowserTesterIsBroken())