my $tests_total;
+sub noninteractive {
+ # CONTINUOUS_INTEGRATION gets set when running under Travis, see
+ # http://docs.travis-ci.com/user/ci-environment/ and
+ # https://github.com/travis-ci/travis-ci/issues/1337
+ return (! -t STDOUT) || $ENV{CONTINUOUS_INTEGRATION} eq 'true';
+}
+
# setup %ansi_line_upwards to map all working displays to the
# specific movement commands and initialize all status lines
sub status_init {
my $displays = $args{displays};
$tests_total = $args{tests};
+ return if noninteractive();
+
for my $n (1 .. @$displays) {
# since we are moving upwards, get $display in reverse order
my $display = $displays->[-$n];
my ($display, $msg) = @_;
my $status = "[$display] $msg";
+ return $status if noninteractive();
+
print
$ansi_save_cursor,
$ansi_line_upwards{$display},
sub status_completed {
my $num = shift;
+
+ return if noninteractive();
+
print
$ansi_save_cursor,
$ansi_clear_line,