tests: add support in run-tests.py for an environment variable to stop color stable
authorAugie Fackler <augie@google.com>
Wed, 26 Jul 2017 17:56:44 -0400
branchstable
changeset 33592 cc96449f00c9
parent 33591 ee11d18fcd3c
child 33593 441a4550a80a
tests: add support in run-tests.py for an environment variable to stop color I don't like the color output, so this gives me a way to easily never see it while still having pygments on my machine.
tests/run-tests.py
--- a/tests/run-tests.py	Wed Jul 26 13:21:34 2017 -0400
+++ b/tests/run-tests.py	Wed Jul 26 17:56:44 2017 -0400
@@ -269,7 +269,7 @@
     parser.add_option("-c", "--cover", action="store_true",
         help="print a test coverage report")
     parser.add_option("--color", choices=["always", "auto", "never"],
-                      default="auto",
+                      default=os.environ.get('HGRUNTESTSCOLOR', 'auto'),
                       help="colorisation: always|auto|never (default: auto)")
     parser.add_option("-d", "--debug", action="store_true",
         help="debug mode: write output of test scripts to console"