summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2019-06-09 15:43:54 +0000
committerintrigeri <intrigeri@boum.org>2019-06-09 15:43:54 +0000
commitb7eb54d3c98cfebc2d428ec63824a9034ecc3145 (patch)
treee1dc3314468ee7644c3ebfedf82a4d21d0e2788b
parentc9a49da56c7643330f2a56a97693b9ccbf7a0f37 (diff)
Test suite: also include the content of /var/log/tor/log in $scenario.tor when tor failed to bootstrap (refs: #16793)
cd0d51390932083835f749fa5b0ddab6e6e4e9ba says it will do this: "When Tor fails to bootstrap, save Tor logs". But it only saves bits of the Journal, i.e. the initial logs sent by tor to syslog before our Log notice file /var/log/tor/log is taken into account (commit:419517551cec8deeb322d8fa6fd18da258576066). So the resulting $scenario.tor file contains very little info, and typically not the info we need to debug stuff. Let's fix that.
-rw-r--r--features/support/helpers/misc_helpers.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/features/support/helpers/misc_helpers.rb b/features/support/helpers/misc_helpers.rb
index b156978..7bdc8d9 100644
--- a/features/support/helpers/misc_helpers.rb
+++ b/features/support/helpers/misc_helpers.rb
@@ -166,6 +166,7 @@ rescue Timeout::Error
# Save Tor logs before erroring out
File.open("#{$config["TMPDIR"]}/log.tor", 'w') { |file|
file.write("#{$vm.execute('journalctl --no-pager -u tor@default.service').stdout}")
+ file.write($vm.file_content('/var/log/tor/log'))
}
raise TorBootstrapFailure.new('Tor failed to bootstrap')
end