Commit 0b854efd authored by Tails developers's avatar Tails developers
Browse files

Merge remote-tracking branch 'origin/test/fix-iso-reporting' into stable

parents c4f7b9ba 40cc0bf3
......@@ -4,8 +4,6 @@ require "#{Dir.pwd}/features/support/helpers/misc_helpers.rb"
# Dynamic
$tails_iso = ENV['ISO'] || get_newest_iso
$old_tails_iso = ENV['OLD_ISO'] || get_oldest_iso
puts "Testing ISO image: #{File.basename($tails_iso)}"
puts "Using old ISO image: #{File.basename($old_tails_iso)}"
$tmp_dir = ENV['TEMP_DIR'] || "/tmp/TailsToaster"
$vm_xml_path = ENV['VM_XML_PATH'] || "#{Dir.pwd}/features/domains"
$misc_files_dir = "#{Dir.pwd}/features/misc_files"
......
......@@ -19,19 +19,6 @@ def delete_all_snapshots
end
end
BeforeFeature('@old_iso') do
if $old_tails_iso.nil?
raise "No old Tails ISO image specified, and none could be found in the " +
"current directory"
end
if !File.exist?($old_tails_iso)
raise "The specified old Tails ISO image '#{$old_tails_iso}' does not exist"
end
if $tails_iso == $old_tails_iso
raise "The old Tails ISO is the same as the Tails ISO we're testing"
end
end
BeforeFeature('@product') do |feature|
if File.exist?($tmp_dir)
if !File.directory?($tmp_dir)
......@@ -74,6 +61,7 @@ BeforeFeature('@product') do |feature|
else
raise "The specified Tails ISO image '#{$tails_iso}' does not exist"
end
puts "Testing ISO image: #{File.basename($tails_iso)}"
base = File.basename(feature.file, ".feature").to_s
$background_snapshot = "#{$tmp_dir}/#{base}_background.state"
end
......@@ -83,6 +71,20 @@ AfterFeature('@product') do
VM.storage.clear_volumes if VM.storage
end
BeforeFeature('@product', '@old_iso') do
if $old_tails_iso.nil?
raise "No old Tails ISO image specified, and none could be found in the " +
"current directory"
end
if !File.exist?($old_tails_iso)
raise "The specified old Tails ISO image '#{$old_tails_iso}' does not exist"
end
if $tails_iso == $old_tails_iso
raise "The old Tails ISO is the same as the Tails ISO we're testing"
end
puts "Using old ISO image: #{File.basename($old_tails_iso)}"
end
# BeforeScenario
Before('@product') do
@screen = Sikuli::Screen.new
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment