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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: ppapi/native_client/tests/nacl_browser/inbrowser_test_runner/nacl.scons
diff --git a/ppapi/native_client/tests/nacl_browser/inbrowser_test_runner/nacl.scons b/ppapi/native_client/tests/nacl_browser/inbrowser_test_runner/nacl.scons
new file mode 100644
index 0000000000000000000000000000000000000000..60ae804bee18d72f88a8fb8628f8ed75252cec53
--- /dev/null
+++ b/ppapi/native_client/tests/nacl_browser/inbrowser_test_runner/nacl.scons
@@ -0,0 +1,60 @@
+# -*- python -*-
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import json
+import posixpath
+
+Import('env')
+
+# Enable untrusted exception handling (for exception_test).
+env['ENV']['NACL_UNTRUSTED_EXCEPTION_HANDLING'] = '1'
+
+env.ComponentLibrary('testrunner_browser', ['test_runner_ppapi.c'])
+
+dest_copy = env.Replicate('$STAGING_DIR', 'test_runner.html')
+env.Replicate('$STAGING_DIR',
+ '${SCONSTRUCT_DIR}/tools/browser_tester/browserdata/nacltest.js')
+
+def AddTest(env, test_name, exe_list, parallel=False):
+ test_files = [env.File('${STAGING_DIR}/%s${PROGSUFFIX}'
+ % env.ProgramNameForNmf(exe_name))
+ for exe_name in exe_list]
+
+ def WriteManifestList(target, source, env):
+ nmf_names = ['%s.nmf' % exe_name for exe_name in exe_list]
+ data = ('// This file is automatically generated\n'
+ 'var G_NMF_TEST_LIST = %s;\n' % json.dumps(nmf_names))
+ fh = open(target[0].abspath, 'w')
+ fh.write(data)
+ fh.close()
+
+ nmf_list_js = env.Command(['%s_nmf_test_list.js' % test_name], [],
+ WriteManifestList)[0]
+ # Scons does not track the dependency of nmf_list_js on exe_list, so
+ # we must always recreate nmf_list_js when it is used.
+ env.AlwaysBuild(nmf_list_js)
+
+ node = env.PPAPIBrowserTester(
+ '%s.out' % test_name, url='test_runner.html',
+ nmf_names=exe_list,
+ files=[env.File('test_runner.html')] + test_files,
+ map_files=[('nmf_test_list.js', nmf_list_js)],
+ test_args=[('parallel', int(parallel))],
+ osenv=['NACL_EXE_STDOUT=DEBUG_ONLY:dev://postmessage',
+ 'NACL_EXE_STDERR=DEBUG_ONLY:dev://postmessage'])
+
+ # Disabled on Valgrind because of multiple nexes.
+ # TODO(eugenis): enable when Valgrind learns to autodetect the nexe name
+ env.AddNodeToTestSuite(node, ['chrome_browser_tests'], test_name,
+ disable_irt_suffix=True,
+ is_broken=env.PPAPIBrowserTesterIsBroken() or
+ env.Bit('running_on_valgrind'))
+
+if not env.Bit('tests_use_irt'):
+ Return()
+
+exe_list = env['TESTS_TO_RUN_INBROWSER']
+AddTest(env, 'run_inbrowser_test_runner', exe_list, parallel=False)
+AddTest(env, 'run_inbrowser_test_runner_parallel', exe_list, parallel=True)

Powered by Google App Engine
This is Rietveld 408576698