]> git.sur5r.net Git - i3/i3/blobdiff - testcases/complete-run.pl
Merge branch 'master' into next
[i3/i3] / testcases / complete-run.pl
index fe652623fe7f4b6445b4f14e65b7b908586ddd3e..cb7b5c8c107fb4bb83ff29746afc027b61a4a036 100755 (executable)
@@ -172,7 +172,16 @@ my @slowest = map  { $_->[0] }
               grep { !/^GLOBAL$/ } keys %timings;
 say '';
 say 'The slowest tests are:';
-printf("\t%s with %.2f seconds\n", $_, $timings{$_}) for @slowest[0..4];
+printf("\t%s with %.2f seconds\n", $_, $timings{$_})
+    for @slowest[0..($#slowest > 4 ? 4 : $#slowest)];
+
+# When we are running precisely one test, print the output. Makes developing
+# with a single testcase easier.
+if ($numtests == 1) {
+    say '';
+    say 'Test output:';
+    say StartXDummy::slurp($logfile);
+}
 
 END { cleanup() }