summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2019-06-09 15:54:08 +0000
committerintrigeri <intrigeri@boum.org>2019-06-09 15:54:08 +0000
commit96cafa51de51e98b33e01f41ccbc94b7542802e0 (patch)
tree2abb2b08bfdb52d332c0cc5cbe167d3f0a60b73a
parentb13a5f18cb4d91eb9b8e9dd51881044ab4d4e11e (diff)
parentb28afe364343be1de542338b4fcc2721e4992592 (diff)
Merge branch 'test/16793-save-all-tor-logs' into bugfix/16471-drop-time-synchronization-hacks+force-all-testsbugfix/16471-drop-time-synchronization-hacks+force-all-tests
-rw-r--r--features/support/helpers/misc_helpers.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/features/support/helpers/misc_helpers.rb b/features/support/helpers/misc_helpers.rb
index b156978..e9e7309 100644
--- a/features/support/helpers/misc_helpers.rb
+++ b/features/support/helpers/misc_helpers.rb
@@ -164,8 +164,10 @@ def wait_until_tor_is_working
try_for(270) { $vm.execute('/usr/local/sbin/tor-has-bootstrapped').success? }
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.open("#{$config["TMPDIR"]}/log.tor", 'w') { |file|
+ $vm.execute('journalctl --no-pager -u tor@default.service > /tmp/tor.journal')
+ file.write($vm.file_content('/tmp/tor.journal'))
+ file.write($vm.file_content('/var/log/tor/log'))
}
raise TorBootstrapFailure.new('Tor failed to bootstrap')
end