aboutsummaryrefslogtreecommitdiff
path: root/tools/testrunner/local
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testrunner/local')
-rw-r--r--tools/testrunner/local/commands.py9
-rw-r--r--tools/testrunner/local/execution.py9
-rw-r--r--tools/testrunner/local/pool_unittest.py7
-rw-r--r--tools/testrunner/local/statusfile.py18
-rw-r--r--tools/testrunner/local/variants.py6
5 files changed, 40 insertions, 9 deletions
diff --git a/tools/testrunner/local/commands.py b/tools/testrunner/local/commands.py
index a9315cb7..94b892c3 100644
--- a/tools/testrunner/local/commands.py
+++ b/tools/testrunner/local/commands.py
@@ -26,6 +26,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+import os
import subprocess
import sys
from threading import Timer
@@ -62,11 +63,19 @@ def RunProcess(verbose, timeout, args, **rest):
prev_error_mode = Win32SetErrorMode(error_mode)
Win32SetErrorMode(error_mode | prev_error_mode)
+ env = os.environ.copy()
+ # GTest shard information is read by the V8 tests runner. Make sure it
+ # doesn't leak into the execution of gtests we're wrapping. Those might
+ # otherwise apply a second level of sharding and as a result skip tests.
+ env.pop('GTEST_TOTAL_SHARDS', None)
+ env.pop('GTEST_SHARD_INDEX', None)
+
try:
process = subprocess.Popen(
args=popen_args,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
+ env=env,
**rest
)
except Exception as e:
diff --git a/tools/testrunner/local/execution.py b/tools/testrunner/local/execution.py
index 4cb9e45a..6adfd09b 100644
--- a/tools/testrunner/local/execution.py
+++ b/tools/testrunner/local/execution.py
@@ -197,12 +197,17 @@ class Runner(object):
self.perf_failures = False
self.printed_allocations = False
self.tests = [ t for s in suites for t in s.tests ]
+
+ # Always pre-sort by status file, slowest tests first.
+ slow_key = lambda t: statusfile.IsSlow(t.outcomes)
+ self.tests.sort(key=slow_key, reverse=True)
+
+ # Sort by stored duration of not opted out.
if not context.no_sorting:
for t in self.tests:
t.duration = self.perfdata.FetchPerfData(t) or 1.0
- slow_key = lambda t: statusfile.IsSlow(t.outcomes)
- self.tests.sort(key=slow_key, reverse=True)
self.tests.sort(key=lambda t: t.duration, reverse=True)
+
self._CommonInit(suites, progress_indicator, context)
def _CommonInit(self, suites, progress_indicator, context):
diff --git a/tools/testrunner/local/pool_unittest.py b/tools/testrunner/local/pool_unittest.py
index 335d20a6..235eca63 100644
--- a/tools/testrunner/local/pool_unittest.py
+++ b/tools/testrunner/local/pool_unittest.py
@@ -23,9 +23,10 @@ class PoolTest(unittest.TestCase):
def testException(self):
results = set()
pool = Pool(3)
- for result in pool.imap_unordered(Run, [[x] for x in range(0, 12)]):
- # Item 10 will not appear in results due to an internal exception.
- results.add(result.value)
+ with self.assertRaises(Exception):
+ for result in pool.imap_unordered(Run, [[x] for x in range(0, 12)]):
+ # Item 10 will not appear in results due to an internal exception.
+ results.add(result.value)
expect = set(range(0, 12))
expect.remove(10)
self.assertEquals(expect, results)
diff --git a/tools/testrunner/local/statusfile.py b/tools/testrunner/local/statusfile.py
index 09175404..b03fcc12 100644
--- a/tools/testrunner/local/statusfile.py
+++ b/tools/testrunner/local/statusfile.py
@@ -232,11 +232,22 @@ def _ReadSection(section, rules, wildcards, variables):
else:
_ParseOutcomeList(rule, section[rule], rules, variables)
+JS_TEST_PATHS = {
+ 'debugger': [[]],
+ 'inspector': [[]],
+ 'intl': [[]],
+ 'message': [[]],
+ 'mjsunit': [[]],
+ 'mozilla': [['data']],
+ 'test262': [['data', 'test'], ['local-tests', 'test']],
+ 'webkit': [[]],
+}
def PresubmitCheck(path):
with open(path) as f:
contents = ReadContent(f.read())
- root_prefix = os.path.basename(os.path.dirname(path)) + "/"
+ basename = os.path.basename(os.path.dirname(path))
+ root_prefix = basename + "/"
status = {"success": True}
def _assert(check, message): # Like "assert", but doesn't throw.
if not check:
@@ -255,6 +266,11 @@ def PresubmitCheck(path):
"Suite name prefix must not be used in rule keys")
_assert(not rule.endswith('.js'),
".js extension must not be used in rule keys.")
+ if basename in JS_TEST_PATHS and '*' not in rule:
+ _assert(any(os.path.exists(os.path.join(os.path.dirname(path),
+ *(paths + [rule + ".js"])))
+ for paths in JS_TEST_PATHS[basename]),
+ "missing file for %s test %s" % (basename, rule))
return status["success"]
except Exception as e:
print e
diff --git a/tools/testrunner/local/variants.py b/tools/testrunner/local/variants.py
index ea42bf52..4d1c6a3c 100644
--- a/tools/testrunner/local/variants.py
+++ b/tools/testrunner/local/variants.py
@@ -12,8 +12,8 @@ ALL_VARIANT_FLAGS = {
"ignition": [["--ignition"]],
"ignition_staging": [["--ignition-staging"]],
"ignition_turbofan": [["--ignition-staging", "--turbo"]],
- "preparser": [["--min-preparse-length=0"]],
"asm_wasm": [["--validate-asm"]],
+ "wasm_traps": [["--wasm_guard_pages", "--invoke-weak-callbacks"]],
}
# FAST_VARIANTS implies no --always-opt.
@@ -25,10 +25,10 @@ FAST_VARIANT_FLAGS = {
"ignition": [["--ignition"]],
"ignition_staging": [["--ignition-staging"]],
"ignition_turbofan": [["--ignition-staging", "--turbo"]],
- "preparser": [["--min-preparse-length=0"]],
"asm_wasm": [["--validate-asm"]],
+ "wasm_traps": [["--wasm_guard_pages", "--invoke-weak-callbacks"]],
}
ALL_VARIANTS = set(["default", "stress", "turbofan", "turbofan_opt",
"nocrankshaft", "ignition", "ignition_staging",
- "ignition_turbofan", "preparser", "asm_wasm"])
+ "ignition_turbofan", "asm_wasm", "wasm_traps"])