From: Zac Medico Date: Wed, 11 Jul 2012 22:13:18 +0000 (-0700) Subject: tests: support NOCOLOR env variable X-Git-Tag: v2.2.0_alpha117~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=48497bca12ac8b52740681a7a10200f0a58345ea;p=portage.git tests: support NOCOLOR env variable --- diff --git a/pym/portage/tests/resolver/ResolverPlayground.py b/pym/portage/tests/resolver/ResolverPlayground.py index e65f9f8ff..0ac209761 100644 --- a/pym/portage/tests/resolver/ResolverPlayground.py +++ b/pym/portage/tests/resolver/ResolverPlayground.py @@ -503,6 +503,9 @@ class ResolverPlayground(object): 'PORTAGE_TMPDIR' : os.path.join(self.eroot, 'var/tmp'), } + if os.environ.get("NOCOLOR"): + env["NOCOLOR"] = os.environ["NOCOLOR"] + if os.environ.get("SANDBOX_ON") == "1": # avoid problems from nested sandbox instances env["FEATURES"] = "-sandbox" diff --git a/pym/portage/tests/runTests b/pym/portage/tests/runTests index 91984a3a3..1c1008dff 100755 --- a/pym/portage/tests/runTests +++ b/pym/portage/tests/runTests @@ -37,6 +37,9 @@ import portage # work the same regardless of global configuration file state/existence. portage._disable_legacy_globals() +if os.environ.get('NOCOLOR') in ('yes', 'true'): + portage.output.nocolor() + import portage.tests as tests from portage.const import PORTAGE_BIN_PATH path = os.environ.get("PATH", "").split(":")