summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-07-11 15:13:18 -0700
committerZac Medico <zmedico@gentoo.org>2012-07-11 15:13:18 -0700
commit48497bca12ac8b52740681a7a10200f0a58345ea (patch)
treee19f771da1c2acd33e3699debca3cb8805e34ca5
parentFix --complete-graph-if-new-use for --autounmask. (diff)
downloadportage-48497bca12ac8b52740681a7a10200f0a58345ea.tar.gz
portage-48497bca12ac8b52740681a7a10200f0a58345ea.tar.bz2
portage-48497bca12ac8b52740681a7a10200f0a58345ea.zip
tests: support NOCOLOR env variable
-rw-r--r--pym/portage/tests/resolver/ResolverPlayground.py3
-rwxr-xr-xpym/portage/tests/runTests3
2 files changed, 6 insertions, 0 deletions
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(":")