Reviewers: Michael Achenbach (OOO),

Description:
Make run-tests.py warn when it's not testing anything

I've often been confused by an "all passed" run of the test script
when it turned out that either all the tests I cared about were skipped
or, more likely, I mistyped the name(s) of the tests I wanted to run.
This patch aims to fix that (and gives a useful diagnostic for the
"all matched tests were skipped" case).

[email protected]

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

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

Affected files (+8, -2 lines):
  M tools/run-tests.py


Index: tools/run-tests.py
diff --git a/tools/run-tests.py b/tools/run-tests.py
index a9a81f8299878ec09964242ea3ed5169e506c9be..7b4c5c122fd9cca363ae48a2ca2f2d230f7019cf 100755
--- a/tools/run-tests.py
+++ b/tools/run-tests.py
@@ -532,8 +532,6 @@ def Main():


 def Execute(arch, mode, args, options, suites, workspace):
-  print(">>> Running tests for %s.%s" % (arch, mode))
-
   shell_dir = options.shell_dir
   if not shell_dir:
     if options.buildbot:
@@ -651,6 +649,14 @@ def Execute(arch, mode, args, options, suites, workspace):
   if options.cat:
     return 0  # We're done here.

+  if num_tests == 0:
+    print("No tests selected for running!")
+    if len(all_tests) > 0:
+      verbose.PrintReport(all_tests)
+    return 0
+
+  print(">>> Running tests for %s.%s" % (arch, mode))
+
   if options.report:
     verbose.PrintReport(all_tests)



--
--
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