launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #05532
[Merge] lp:~stevenk/launchpad/subunit-default-not-a-tty into lp:launchpad
Steve Kowalik has proposed merging lp:~stevenk/launchpad/subunit-default-not-a-tty into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~stevenk/launchpad/subunit-default-not-a-tty/+merge/82352
Scratch an itch -- if bin/test's stdout is not a tty, then turn on the --subunit option.
--
https://code.launchpad.net/~stevenk/launchpad/subunit-default-not-a-tty/+merge/82352
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~stevenk/launchpad/subunit-default-not-a-tty into lp:launchpad.
=== modified file 'buildout-templates/bin/test.in'
--- buildout-templates/bin/test.in 2011-07-15 15:46:51 +0000
+++ buildout-templates/bin/test.in 2011-11-16 05:32:25 +0000
@@ -47,7 +47,6 @@
# Make tests run in a timezone no launchpad developers live in.
# Our tests need to run in any timezone.
-# (This is no longer actually required, as PQM does this.)
os.environ['TZ'] = 'Asia/Calcutta'
time.tzset()
@@ -245,6 +244,10 @@
# edge case, so we don't have to care about it.
options.parser.defaults[name] = value
+ # If stdout is not a tty, turn on subunit.
+ if not sys.stdout.isatty():
+ options.subunit = True
+
# Turn on Layer profiling if requested.
from canonical.testing import profiled
if local_options.verbose >= 3 and main_process: