Commit b925fc56 authored by machenbach's avatar machenbach Committed by Commit bot

Add no-test-harness mode to test driver.

BUG=

Review URL: https://codereview.chromium.org/855993003

Cr-Commit-Position: refs/heads/master@{#26150}
parent 3442a5f9
......@@ -77,7 +77,9 @@ class MjsunitTestSuite(testsuite.TestSuite):
if SELF_SCRIPT_PATTERN.search(source):
env = ["-e", "TEST_FILE_NAME=\"%s\"" % testfilename.replace("\\", "\\\\")]
files = env + files
files.append(os.path.join(self.root, "mjsunit.js"))
if not context.no_harness:
files.append(os.path.join(self.root, "mjsunit.js"))
files.append(testfilename)
flags += files
......
......@@ -379,7 +379,8 @@ def Execute(arch, mode, args, options, suites, workspace):
True, # No sorting of test cases.
0, # Don't rerun failing tests.
0, # No use of a rerun-failing-tests maximum.
False) # No predictable mode.
False, # No predictable mode.
False) # No no_harness mode.
# Find available test suites and read test cases from them.
variables = {
......
......@@ -175,6 +175,9 @@ def BuildOptions():
result.add_option("-m", "--mode",
help="The test modes in which to run (comma-separated)",
default="release,debug")
result.add_option("--no-harness", "--noharness",
help="Run without test harness of a given suite",
default=False, action="store_true")
result.add_option("--no-i18n", "--noi18n",
help="Skip internationalization tests",
default=False, action="store_true")
......@@ -492,7 +495,8 @@ def Execute(arch, mode, args, options, suites, workspace):
options.no_sorting,
options.rerun_failures_count,
options.rerun_failures_max,
options.predictable)
options.predictable,
options.no_harness)
# TODO(all): Combine "simulator" and "simulator_run".
simulator_run = not options.dont_skip_simulator_slow_tests and \
......
......@@ -30,7 +30,7 @@ class Context():
def __init__(self, arch, mode, shell_dir, mode_flags, verbose, timeout,
isolates, command_prefix, extra_flags, noi18n, random_seed,
no_sorting, rerun_failures_count, rerun_failures_max,
predictable):
predictable, no_harness):
self.arch = arch
self.mode = mode
self.shell_dir = shell_dir
......@@ -46,16 +46,18 @@ class Context():
self.rerun_failures_count = rerun_failures_count
self.rerun_failures_max = rerun_failures_max
self.predictable = predictable
self.no_harness = no_harness
def Pack(self):
return [self.arch, self.mode, self.mode_flags, self.timeout, self.isolates,
self.command_prefix, self.extra_flags, self.noi18n,
self.random_seed, self.no_sorting, self.rerun_failures_count,
self.rerun_failures_max, self.predictable]
self.rerun_failures_max, self.predictable, self.no_harness]
@staticmethod
def Unpack(packed):
# For the order of the fields, refer to Pack() above.
return Context(packed[0], packed[1], None, packed[2], False,
packed[3], packed[4], packed[5], packed[6], packed[7],
packed[8], packed[9], packed[10], packed[11], packed[12])
packed[8], packed[9], packed[10], packed[11], packed[12],
packed[13])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment