Bug 1277039 - Fix output of |mach webidl-parser-test| to be less verbose by default, r=gps
authorJames Graham <james@hoppipolla.co.uk>
Mon, 06 Jun 2016 17:52:24 +0100
changeset 300939 7ec7b62eb5bc420a2f940f89bc59075f78ce184d
parent 300938 e4c8b7d0abede9f0495669e7fa0b5ae6f5b22a0c
child 300940 815b7fb28fdf9239310c91e1461708c2b230ecf2
push id19599
push usercbook@mozilla.com
push dateWed, 08 Jun 2016 10:16:21 +0000
treeherderfx-team@81f4cc3f6f4c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1277039
milestone50.0a1
Bug 1277039 - Fix output of |mach webidl-parser-test| to be less verbose by default, r=gps MozReview-Commit-ID: AiMiksDzUdt
dom/bindings/mach_commands.py
dom/bindings/parser/runtests.py
--- a/dom/bindings/mach_commands.py
+++ b/dom/bindings/mach_commands.py
@@ -37,16 +37,19 @@ class WebIDLProvider(MachCommandBase):
     def webidl_test(self, **kwargs):
         sys.path.insert(0, os.path.join(self.topsrcdir, 'other-licenses',
                         'ply'))
 
         # Make sure we drop our cached grammar bits in the objdir, not
         # wherever we happen to be running from.
         os.chdir(self.topobjdir)
 
+        if kwargs["verbose"] is None:
+            kwargs["verbose"] = False
+
         # Now we're going to create the cached grammar file in the
         # objdir.  But we're going to try loading it as a python
         # module, so we need to make sure the objdir is in our search
         # path.
         sys.path.insert(0, self.topobjdir)
 
         import runtests
         return runtests.run_tests(kwargs["tests"], verbose=kwargs["verbose"])
--- a/dom/bindings/parser/runtests.py
+++ b/dom/bindings/parser/runtests.py
@@ -88,19 +88,21 @@ def run_tests(tests, verbose):
             print '%s:' % test
             for failure in failures:
                 print 'TEST-UNEXPECTED-FAIL | %s' % failure
 
 def get_parser():
     usage = """%(prog)s [OPTIONS] [TESTS]
                Where TESTS are relative to the tests directory."""
     parser = argparse.ArgumentParser(usage=usage)
-    parser.add_argument('-q', '--quiet', action='store_false', dest='verbose', default=True,
-                        help="Don't print passing tests.")
-    parser.add_argument('-v', '--verbose', action='store_true', dest='verbose', default=True,
+    parser.add_argument('-q', '--quiet', action='store_false', dest='verbose',
+                        help="Don't print passing tests.", default=None)
+    parser.add_argument('-v', '--verbose', action='store_true', dest='verbose',
                         help="Run tests in verbose mode.")
     parser.add_argument('tests', nargs="*", help="Tests to run")
     return parser
 
 if __name__ == '__main__':
     parser = get_parser()
     args = parser.parse_args()
+    if args.verbose is None:
+        args.verbose = True
     run_tests(args.tests, verbose=args.verbose)