summaryrefslogtreecommitdiffstats
path: root/features/support/helpers/dogtail.rb
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2017-02-07 01:46:02 +0000
committerintrigeri <intrigeri@boum.org>2017-02-07 01:46:02 +0000
commita125665e9ca875c16465f014c3cafe002eef1572 (patch)
tree375e19d545131856a70684c5fce29bb415eb299b /features/support/helpers/dogtail.rb
parent0bab7e30681f7b481f5967d38686770460533b4c (diff)
parent4bb09f3837bd8864afd085e69654cd497690fe70 (diff)
Merge remote-tracking branch 'origin/devel' into feature/tor-nightly-master
Diffstat (limited to 'features/support/helpers/dogtail.rb')
-rw-r--r--features/support/helpers/dogtail.rb14
1 files changed, 9 insertions, 5 deletions
diff --git a/features/support/helpers/dogtail.rb b/features/support/helpers/dogtail.rb
index 59fac3c..2d81205 100644
--- a/features/support/helpers/dogtail.rb
+++ b/features/support/helpers/dogtail.rb
@@ -85,15 +85,19 @@ module Dogtail
lines = [lines] if lines.class != Array
script = build_script(lines)
script_path = $vm.execute_successfully('mktemp', @opts).stdout.chomp
- $vm.file_overwrite(script_path, script, @opts[:user])
+ $vm.file_overwrite(script_path, script)
args = ["/usr/bin/python '#{script_path}'", @opts]
if @opts[:allow_failure]
- ret = $vm.execute(*args)
+ return $vm.execute(*args)
else
- ret = $vm.execute_successfully(*args)
+ begin
+ return $vm.execute_successfully(*args)
+ rescue Exception => e
+ debug_log("Failing Dogtail script (#{script_path}):")
+ script.split("\n").each { |line| debug_log(" "*4 + line) }
+ raise e
+ end
end
- $vm.execute("rm -f '#{script_path}'")
- ret
end
def self.value_to_s(v)