aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/tools/testrunner/local
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/tools/testrunner/local')
-rw-r--r--deps/v8/tools/testrunner/local/command.py19
-rw-r--r--deps/v8/tools/testrunner/local/junit_output.py49
-rw-r--r--deps/v8/tools/testrunner/local/testsuite.py7
-rwxr-xr-xdeps/v8/tools/testrunner/local/testsuite_unittest.py3
-rw-r--r--deps/v8/tools/testrunner/local/variants.py11
5 files changed, 32 insertions, 57 deletions
diff --git a/deps/v8/tools/testrunner/local/command.py b/deps/v8/tools/testrunner/local/command.py
index 8c0264e335..5eb0d8b20a 100644
--- a/deps/v8/tools/testrunner/local/command.py
+++ b/deps/v8/tools/testrunner/local/command.py
@@ -155,6 +155,25 @@ class BaseCommand(object):
class PosixCommand(BaseCommand):
+ # TODO(machenbach): Use base process start without shell once
+ # https://crbug.com/v8/8889 is resolved.
+ def _start_process(self):
+ def wrapped(arg):
+ if set('() \'"') & set(arg):
+ return "'%s'" % arg.replace("'", "'\"'\"'")
+ return arg
+ try:
+ return subprocess.Popen(
+ args=' '.join(map(wrapped, self._get_popen_args())),
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ env=self._get_env(),
+ shell=True,
+ )
+ except Exception as e:
+ sys.stderr.write('Error executing: %s\n' % self)
+ raise e
+
def _kill_process(self, process):
process.kill()
diff --git a/deps/v8/tools/testrunner/local/junit_output.py b/deps/v8/tools/testrunner/local/junit_output.py
deleted file mode 100644
index 52f31ec422..0000000000
--- a/deps/v8/tools/testrunner/local/junit_output.py
+++ /dev/null
@@ -1,49 +0,0 @@
-# Copyright 2013 the V8 project authors. All rights reserved.
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided
-# with the distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-import xml.etree.ElementTree as xml
-
-
-class JUnitTestOutput:
- def __init__(self, test_suite_name):
- self.root = xml.Element("testsuite")
- self.root.attrib["name"] = test_suite_name
-
- def HasRunTest(self, test_name, test_cmd, test_duration, test_failure):
- testCaseElement = xml.Element("testcase")
- testCaseElement.attrib["name"] = test_name
- testCaseElement.attrib["cmd"] = test_cmd
- testCaseElement.attrib["time"] = str(round(test_duration, 3))
- if len(test_failure):
- failureElement = xml.Element("failure")
- failureElement.text = test_failure
- testCaseElement.append(failureElement)
- self.root.append(testCaseElement)
-
- def FinishAndWrite(self, f):
- xml.ElementTree(self.root).write(f, "UTF-8")
diff --git a/deps/v8/tools/testrunner/local/testsuite.py b/deps/v8/tools/testrunner/local/testsuite.py
index 8656c1636d..1bfc0317fe 100644
--- a/deps/v8/tools/testrunner/local/testsuite.py
+++ b/deps/v8/tools/testrunner/local/testsuite.py
@@ -241,15 +241,16 @@ def _load_testsuite_module(name, root):
class TestSuite(object):
@staticmethod
- def Load(root, test_config):
+ def Load(root, test_config, framework_name):
name = root.split(os.path.sep)[-1]
with _load_testsuite_module(name, root) as module:
- return module.GetSuite(name, root, test_config)
+ return module.GetSuite(name, root, test_config, framework_name)
- def __init__(self, name, root, test_config):
+ def __init__(self, name, root, test_config, framework_name):
self.name = name # string
self.root = root # string containing path
self.test_config = test_config
+ self.framework_name = framework_name # name of the test runner impl
self.tests = None # list of TestCase objects
self.statusfile = None
diff --git a/deps/v8/tools/testrunner/local/testsuite_unittest.py b/deps/v8/tools/testrunner/local/testsuite_unittest.py
index 1cca79c205..b74fef1842 100755
--- a/deps/v8/tools/testrunner/local/testsuite_unittest.py
+++ b/deps/v8/tools/testrunner/local/testsuite_unittest.py
@@ -37,7 +37,8 @@ class TestSuiteTest(unittest.TestCase):
verbose=False,
)
- self.suite = TestSuite.Load(self.test_root, self.test_config)
+ self.suite = TestSuite.Load(
+ self.test_root, self.test_config, "standard_runner")
def testLoadingTestSuites(self):
self.assertEquals(self.suite.name, "fake_testsuite")
diff --git a/deps/v8/tools/testrunner/local/variants.py b/deps/v8/tools/testrunner/local/variants.py
index b3e446fb3f..ed9b1b87f5 100644
--- a/deps/v8/tools/testrunner/local/variants.py
+++ b/deps/v8/tools/testrunner/local/variants.py
@@ -7,19 +7,22 @@ ALL_VARIANT_FLAGS = {
"code_serializer": [["--cache=code"]],
"default": [[]],
"future": [["--future"]],
- "gc_stats": [["--gc_stats=1"]],
+ "gc_stats": [["--gc-stats=1"]],
# Alias of exhaustive variants, but triggering new test framework features.
"infra_staging": [[]],
"interpreted_regexp": [["--regexp-interpret-all"]],
"jitless": [["--jitless"]],
- "no_liftoff": [["--no-wasm-tier-up"]],
"minor_mc": [["--minor-mc"]],
# No optimization means disable all optimizations. OptimizeFunctionOnNextCall
# would not force optimization too. It turns into a Nop. Please see
# https://chromium-review.googlesource.com/c/452620/ for more discussion.
- "nooptimization": [["--noopt"]],
+ # For WebAssembly, we test "Liftoff-only" in the nooptimization variant and
+ # "TurboFan-only" in the stress variant. The WebAssembly configuration is
+ # independent of JS optimizations, so we can combine those configs.
+ "nooptimization": [["--no-opt", "--liftoff", "--no-wasm-tier-up"]],
"slow_path": [["--force-slow-path"]],
- "stress": [["--stress-opt", "--always-opt"]],
+ "stress": [["--stress-opt", "--always-opt", "--no-liftoff",
+ "--no-wasm-tier-up"]],
"stress_background_compile": [["--stress-background-compile"]],
"stress_incremental_marking": [["--stress-incremental-marking"]],
# Trigger stress sampling allocation profiler with sample interval = 2^14