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 300899 7ec7b62eb5bc420a2f940f89bc59075f78ce184d
parent 300898 e4c8b7d0abede9f0495669e7fa0b5ae6f5b22a0c
child 300900 815b7fb28fdf9239310c91e1461708c2b230ecf2
push id78124
push userjames@hoppipolla.co.uk
push dateTue, 07 Jun 2016 17:30:11 +0000
treeherdermozilla-inbound@7ec7b62eb5bc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1277039
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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)