Skip to content

Commit a427770

Browse files
committed
Tests - print the engine's log when a cold-swap test fails
1 parent 0784e62 commit a427770

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎app/server/ruby/test/test_studio_cold_swap.rb‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ def setup
4949
end
5050

5151
def teardown
52+
# A failure here is the engine's story as much as the studio's, and on
53+
# CI its log is otherwise left behind on the runner.
54+
unless passed? || !File.exist?(@log.to_s)
55+
puts "\n--- #{name}: the engine's log, #{@log} ---", File.read(@log).lines.last(80).join
56+
end
5257
@server&.shutdown rescue nil
5358
return unless @engine
5459
Process.kill("TERM", @engine) rescue nil

0 commit comments

Comments
 (0)