Reviewers: Yang,

Message:
PTAL

Description:
Add no-test-harness mode to test driver.

BUG=

Please review this at https://codereview.chromium.org/855993003/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+15, -6 lines):
  M test/mjsunit/testcfg.py
  M tools/run-deopt-fuzzer.py
  M tools/run-tests.py
  M tools/testrunner/objects/context.py


Index: test/mjsunit/testcfg.py
diff --git a/test/mjsunit/testcfg.py b/test/mjsunit/testcfg.py
index c960ce6b30107e167ad4576f24d0e29594444fd8..181c8478fed289ffb6ea195279947c296a5374f3 100644
--- a/test/mjsunit/testcfg.py
+++ b/test/mjsunit/testcfg.py
@@ -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
Index: tools/run-deopt-fuzzer.py
diff --git a/tools/run-deopt-fuzzer.py b/tools/run-deopt-fuzzer.py
index 223b030523c33dd45a6cbc139c8dd857c52fa0b5..9af864df3c57651abe89762df03ba239b2d2b474 100755
--- a/tools/run-deopt-fuzzer.py
+++ b/tools/run-deopt-fuzzer.py
@@ -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 = {
Index: tools/run-tests.py
diff --git a/tools/run-tests.py b/tools/run-tests.py
index 1374de929189fcd2a1a8de0cc06ac1dc7778615a..21a2c3b4ffe5ffa96bb11711275ce39e43ddbaee 100755
--- a/tools/run-tests.py
+++ b/tools/run-tests.py
@@ -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 \
Index: tools/testrunner/objects/context.py
diff --git a/tools/testrunner/objects/context.py b/tools/testrunner/objects/context.py index 937d9089f35347bc18bd164535982b6298096621..b76e5628094c016f5155c2f80eb65c7f94c1c00b 100644
--- a/tools/testrunner/objects/context.py
+++ b/tools/testrunner/objects/context.py
@@ -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])


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to