Commit 26e57117 authored by Tails developers's avatar Tails developers

Do not auto-pick ISO images to test.

This "feature" may give unexpected results, so it's better to force
the user to be explicit about which ISO images to test. Furthermore,
it introduces complexity, and will require special casing for the plan
of improving the test suite's configuration.
parent 5ea0db31
......@@ -2,8 +2,8 @@ require 'fileutils'
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
$tails_iso = ENV['ISO'] || raise "No ISO set with --iso"
$old_tails_iso = ENV['OLD_ISO'] || raise "No old ISO set with --old-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"
......
......@@ -88,25 +88,6 @@ def cmd_helper(cmd)
end
end
def tails_iso_creation_date(path)
label = cmd_helper("/sbin/blkid -p -s LABEL -o value #{path}")
assert(label[/^TAILS \d+(\.\d+)+(~rc\d+)? - \d+$/],
"Got invalid label '#{label}' from Tails image '#{path}'")
return label[/\d+$/]
end
def sort_isos_by_creation_date
Dir.glob("#{Dir.pwd}/*.iso").sort_by {|f| tails_iso_creation_date(f)}
end
def get_newest_iso
return sort_isos_by_creation_date.last
end
def get_oldest_iso
return sort_isos_by_creation_date.first
end
# This command will grab all router IP addresses from the Tor
# consensus in the VM.
def get_tor_relays
......
......@@ -30,13 +30,10 @@ Options for '@product' features:
--view Shows the test session in a windows. Requires x11vnc
and xtightvncviewer.
--vnc-server-only Starts a VNC server for the test session. Requires x11vnc.
--iso IMAGE Test '@product' features using IMAGE. If none is given,
the ISO with most recent creation date (according to the
ISO's label) in the current directory will be used.
--iso IMAGE Test '@product' features using IMAGE.
--old-iso IMAGE For some '@product' features (e.g. usb_install) we need
an older version of Tails, which this options sets to
IMAGE. If none is given, the ISO with the least recent
creation date will be used.
IMAGE.
Note that '@source' features has no relevant options.
"
......
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