Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: ppapi/native_client/tests/nacl_browser/inbrowser_test_runner/nacl.scons

Issue 10914053: Relocating files in the nacl repo that belong in chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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.
5
6 import json
7 import posixpath
8
9 Import('env')
10
11 # Enable untrusted exception handling (for exception_test).
12 env['ENV']['NACL_UNTRUSTED_EXCEPTION_HANDLING'] = '1'
13
14 env.ComponentLibrary('testrunner_browser', ['test_runner_ppapi.c'])
15
16 dest_copy = env.Replicate('$STAGING_DIR', 'test_runner.html')
17 env.Replicate('$STAGING_DIR',
18 '${SCONSTRUCT_DIR}/tools/browser_tester/browserdata/nacltest.js')
19
20 def AddTest(env, test_name, exe_list, parallel=False):
21 test_files = [env.File('${STAGING_DIR}/%s${PROGSUFFIX}'
22 % env.ProgramNameForNmf(exe_name))
23 for exe_name in exe_list]
24
25 def WriteManifestList(target, source, env):
26 nmf_names = ['%s.nmf' % exe_name for exe_name in exe_list]
27 data = ('// This file is automatically generated\n'
28 'var G_NMF_TEST_LIST = %s;\n' % json.dumps(nmf_names))
29 fh = open(target[0].abspath, 'w')
30 fh.write(data)
31 fh.close()
32
33 nmf_list_js = env.Command(['%s_nmf_test_list.js' % test_name], [],
34 WriteManifestList)[0]
35 # Scons does not track the dependency of nmf_list_js on exe_list, so
36 # we must always recreate nmf_list_js when it is used.
37 env.AlwaysBuild(nmf_list_js)
38
39 node = env.PPAPIBrowserTester(
40 '%s.out' % test_name, url='test_runner.html',
41 nmf_names=exe_list,
42 files=[env.File('test_runner.html')] + test_files,
43 map_files=[('nmf_test_list.js', nmf_list_js)],
44 test_args=[('parallel', int(parallel))],
45 osenv=['NACL_EXE_STDOUT=DEBUG_ONLY:dev://postmessage',
46 'NACL_EXE_STDERR=DEBUG_ONLY:dev://postmessage'])
47
48 # Disabled on Valgrind because of multiple nexes.
49 # TODO(eugenis): enable when Valgrind learns to autodetect the nexe name
50 env.AddNodeToTestSuite(node, ['chrome_browser_tests'], test_name,
51 disable_irt_suffix=True,
52 is_broken=env.PPAPIBrowserTesterIsBroken() or
53 env.Bit('running_on_valgrind'))
54
55 if not env.Bit('tests_use_irt'):
56 Return()
57
58 exe_list = env['TESTS_TO_RUN_INBROWSER']
59 AddTest(env, 'run_inbrowser_test_runner', exe_list, parallel=False)
60 AddTest(env, 'run_inbrowser_test_runner_parallel', exe_list, parallel=True)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698