Make test.py respect NOCOLOR like waf

This commit is contained in:
Peter D. Barnes, Jr
2020-03-23 13:11:14 -07:00
parent 1c35166949
commit c8c1275852

View File

@@ -2014,8 +2014,11 @@ def main(argv):
global options
options = parser.parse_args()[0]
signal.signal(signal.SIGINT, sigint_hook)
# From waf/waflib/Options.py
envcolor=os.environ.get('NOCOLOR','') and 'no' or 'auto' or 'yes'
if options.nocolor:
if options.nocolor or envcolor == 'no':
colors_lst['USE'] = False
return run_tests()