diff --git a/features/domains/default.xml b/features/domains/default.xml index 52247fb98f943863a4ed501b3ce0d4be7010e31b..2c99931dd6bfd9af4005e5a1862336833f4d8a5f 100644 --- a/features/domains/default.xml +++ b/features/domains/default.xml @@ -3,7 +3,7 @@ 2097152 2 - hvm + hvm diff --git a/features/scripts/opencv_match_template.py b/features/scripts/opencv_match_template.py index 7047fb73d5a1ef40afdacf57ef207a81ea2bbb3a..e544e1a7265ea35f884dc05bd04e975edbab3a42 100755 --- a/features/scripts/opencv_match_template.py +++ b/features/scripts/opencv_match_template.py @@ -1,9 +1,5 @@ #!/usr/bin/env python3 -# XXX:Buster: when we drop support for Stretch we can remove this -# import. -from __future__ import print_function - import cv2 import os import sys diff --git a/features/step_definitions/erase_memory.rb b/features/step_definitions/erase_memory.rb index e19ec252af478b2cfeb69dd545fb80947aa606e7..5d5f5d3f883689c55085c9d28c350a74ab3eaab1 100644 --- a/features/step_definitions/erase_memory.rb +++ b/features/step_definitions/erase_memory.rb @@ -226,10 +226,8 @@ When /^I fill a (\d+) MiB file with a known pattern on the (persistent|root) fil end # Note that `yes` prints its own newline, so we have to skip it in # `pattern` below. - # XXX:Stretch: once we drop support < Buster we can improve the - # expression below to `pattern[..-2]`. $vm.execute_successfully( - "yes #{pattern[0, pattern.length - 1]} | " \ + "yes #{pattern[0..-2]} | " \ "dd of=#{dest_file} bs=#{pattern.size} count=#{pattern_nb}" ) end diff --git a/features/step_definitions/mac_spoofing.rb b/features/step_definitions/mac_spoofing.rb index c8cc558ab67f8ed09bdb649df478312b96b49510..a9a24fbfe3e44cddb2bd2a0a0731ae5468c36ec6 100644 --- a/features/step_definitions/mac_spoofing.rb +++ b/features/step_definitions/mac_spoofing.rb @@ -104,14 +104,7 @@ end When /^I hotplug a network device( and wait for it to be initialized)?$/ do |wait| initial_nr_nics = wait ? all_ethernet_nics.size : nil - # XXX:Buster: when we stop supporting the test suite on Stretch - # hosts, let's remove this workaround related to #14819 and just - # settle on a device that works on all supported platforms. - device = if cmd_helper('lsb_release --short --codename').chomp == 'stretch' - 'virtio' - else - 'pcnet' - end + device = 'pcnet' debug_log("Hotplugging a '#{device}' network device") xml = <<-XML diff --git a/features/step_definitions/pidgin.rb b/features/step_definitions/pidgin.rb index d84b24fd607e0363a72223fa527072f2a8751948..f9497a20144abe5d10332e796a78679dc0c4b092 100644 --- a/features/step_definitions/pidgin.rb +++ b/features/step_definitions/pidgin.rb @@ -113,9 +113,7 @@ Given /^my XMPP friend goes online( and joins the multi-user chat)?$/ do |join_c account['username'] + '@' + account['domain'], account['password'], account['otr_key'], - # XXX:Buster: once we stop supporting running our test suite on Stretch, - # replace this with: **(bot_opts.transform_keys(&:to_sym)) - **(bot_opts.each_with_object({}) { |(k, v), a| a[k.to_sym] = v }) + **(bot_opts.transform_keys(&:to_sym)) ) @chatbot.start add_after_scenario_hook { @chatbot.stop } diff --git a/features/step_definitions/totem.rb b/features/step_definitions/totem.rb index a5a87d4e4a23c92878469aea6a082c64165434b3..0a644d096d2192a56bd4166e5fde0344d31a8d9f 100644 --- a/features/step_definitions/totem.rb +++ b/features/step_definitions/totem.rb @@ -5,7 +5,7 @@ Given /^I create sample videos$/ do @video_dir_on_host = "#{$config['TMPDIR']}/video_dir" FileUtils.mkdir_p(@video_dir_on_host) add_after_scenario_hook { FileUtils.rm_r(@video_dir_on_host) } - fatal_system("#{ffmpeg} -loop 1 -t 30 -f image2 " \ + fatal_system('ffmpeg -loop 1 -t 30 -f image2 ' \ "-i 'features/images/USBTailsLogo.png' " \ '-an -vcodec libx264 -y ' \ '-filter:v "crop=in_w-mod(in_w\,2):in_h-mod(in_h\,2)" ' \ diff --git a/features/support/helpers/dogtail.rb b/features/support/helpers/dogtail.rb index a112fb9138bbe829f286050f2d9bb7105d44f03f..0c7aa6b61e423879e8818fcb8652ce8dedc20aa9 100644 --- a/features/support/helpers/dogtail.rb +++ b/features/support/helpers/dogtail.rb @@ -117,8 +117,7 @@ module Dogtail 'False' elsif value.class == String "'#{value}'" - # XXX:Buster: drop the Fixnum line once we stop supporting Stretch - elsif [Fixnum, Integer, Float].include?(value.class) # rubocop:disable Lint/UnifiedInteger + elsif [Integer, Float].include?(value.class) v.to_s else raise "#{self.class.name} does not know how to handle argument type " \ diff --git a/features/support/helpers/misc_helpers.rb b/features/support/helpers/misc_helpers.rb index b44d4b2aabf413fe6f9d9cb14cf77ffed192f252..cf451dbafdd502d10048a7a253be468937825006 100644 --- a/features/support/helpers/misc_helpers.rb +++ b/features/support/helpers/misc_helpers.rb @@ -35,14 +35,7 @@ end def time_delta(start_time, now) elapsed = now - start_time - # XXX: Drop this version check when we drop support for running the test suite - # on Debian Stretch. - if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.4') - format('%.2f', elapsed: elapsed) - .chomp('.00').chomp('.0').chomp('0') - else - elapsed.ceil(2) - end + elapsed.ceil(2) end # Call block (ignoring any exceptions it may throw) repeatedly with @@ -394,8 +387,6 @@ def dbus_send_get_shellcommand(service, object_path, method, *args, **opts) opts ||= {} ruby_type_to_dbus_type = { String => 'string', - # XXX:Buster: drop the Fixnum line once we stop supporting Stretch - Fixnum => 'int32', # rubocop:disable Lint/UnifiedInteger Integer => 'int32', } typed_args = args.map do |arg| @@ -426,14 +417,6 @@ def dbus_send(*args, **opts) dbus_send_ret_conv(ret) end -def ffmpeg - if cmd_helper('lsb_release --short --codename').chomp == 'stretch' - 'avconv' - else - 'ffmpeg' - end -end - # This is IO.popen() that ensures that we wait() for the subprocess to # finish. Please use this instead IO.popen() when running a subprocess # inside a try_for() or other Timeout::timeout() block! diff --git a/features/support/helpers/opencv.rb b/features/support/helpers/opencv.rb index 5e79876d7fa5317884e6dcb099ff5c2b62aa1384..0eabfba540a4cfc49ccc360b7801952be9579a86 100644 --- a/features/support/helpers/opencv.rb +++ b/features/support/helpers/opencv.rb @@ -4,12 +4,6 @@ class OpenCVInternalError < StandardError end module OpenCV - @python = if cmd_helper('lsb_release --short --codename').chomp == 'stretch' - 'python2.7' - else - 'python3' - end - def self.matchTemplate(image, screen, sensitivity, show_match) assert(sensitivity < 1.0) # Do a deep-copy so we don't mess up the outer environment @@ -20,7 +14,7 @@ module OpenCV env['DISPLAY'] = ENV['USER_DISPLAY'] end p = popen_wait( - [env, @python, "#{GIT_DIR}/features/scripts/opencv_match_template.py", + [env, 'python3', "#{GIT_DIR}/features/scripts/opencv_match_template.py", screen, image, sensitivity.to_s, show_match.to_s,], err: [:child, :out] ) diff --git a/features/support/hooks.rb b/features/support/hooks.rb index 5389090b118e54466846ba7406974f96cf1b412a..d50fcf0859afa2f14f81f62ba087db669798471b 100644 --- a/features/support/hooks.rb +++ b/features/support/hooks.rb @@ -224,7 +224,7 @@ Before('@product') do |scenario| if $config['CAPTURE'] video_name = sanitize_filename("#{scenario.name}.mkv") @video_path = "#{ARTIFACTS_DIR}/#{video_name}" - capture = IO.popen([ffmpeg, + capture = IO.popen(['ffmpeg', '-f', 'x11grab', '-s', '1024x768', '-r', '15', diff --git a/run_test_suite b/run_test_suite index 38ebb945b89e1e031d3d156c7ff17de01cd6cd96..dfaf621577e4c29237ff4a32dceda1fd9893b651 100755 --- a/run_test_suite +++ b/run_test_suite @@ -10,6 +10,7 @@ GENERAL_DEPENDENCIES=" cucumber devscripts dnsmasq-base +ffmpeg gawk git i18nspector @@ -23,6 +24,8 @@ obfs4proxy openssh-server ovmf pry +python3-opencv +python3-pil python-jabberbot python-potr qemu-system-x86 @@ -44,20 +47,6 @@ xdotool xvfb " -if [ "$(lsb_release --short --codename)" = "stretch" ]; then - GENERAL_DEPENDENCIES="${GENERAL_DEPENDENCIES} -libav-tools -python-opencv -python-pil -" -else - GENERAL_DEPENDENCIES="${GENERAL_DEPENDENCIES} -ffmpeg -python3-opencv -python3-pil -" -fi - usage() { echo "Usage: $NAME [OPTION]... [--] [CUCUMBER_ARGS]... Sets up an appropriate environment and invokes cucumber. Note that this script diff --git a/wiki/src/contribute/release_process/test/setup.mdwn b/wiki/src/contribute/release_process/test/setup.mdwn index d2dd800a9b8a550cd22a6296f82c74bb105b79c7..bec91fea790649e53bc150c28ca07edcc401294e 100644 --- a/wiki/src/contribute/release_process/test/setup.mdwn +++ b/wiki/src/contribute/release_process/test/setup.mdwn @@ -18,7 +18,7 @@ Operating system

-If you usually run another operating system than Debian Stretch, +If you usually run another operating system than Debian Buster, Bullseye or Sid, then you need to: 1. Enable nested virtualization on your host system. @@ -46,7 +46,7 @@ To install the dependencies on our test suite: 2. Install the following packages: dist=$(lsb_release --short --codename) - if [ "${dist}" != stretch -o "${dist}" != buster ]; then + if [ "${dist}" != buster ]; then # For python-jabberbot and python-potr, that were removed after Buster echo 'deb http://ftp.us.debian.org/debian/ buster main' \ | sudo tee /etc/apt/sources.list.d/buster.list @@ -103,17 +103,9 @@ To install the dependencies on our test suite: x264 \ xdotool \ xvfb \ - $( - if [ "${dist}" = stretch ]; then - echo "libav-tools - python-opencv - python-pil" - else - echo "ffmpeg - python3-opencv - python3-pil" - fi - ) \ + ffmpeg \ + python3-opencv \ + python3-pil \ && \ sudo service libvirtd restart @@ -145,23 +137,9 @@ If you have AppArmor enabled: to `/etc/apparmor.d/libvirt/TEMPLATE.qemu`, in the `profile LIBVIRT_TEMPLATE` section; then delete `/etc/apparmor.d/libvirt/libvirt-*` and restart the test suite. - On Debian Stretch, if you use a custom `TMPDIR` to run the test suite, + If you use a custom `TMPDIR` to run the test suite, replace `/tmp/TailsToaster` with the value of that `$TMPDIR`. -Patched QEMU ------------- - -Due to [[!tails_ticket 12142]] -aka. [[!debbug 851694]], any test scenario that creates a persistent -volume will fail. To work around this problem, rebuild [[!debpts -qemu]] locally with the upstream fix applied. For example, the `qemu` -source package in this APT suite has the fix: - - deb-src http://deb.tails.boum.org/ isotester-stretch main - -This problem does not affect host systems that run Debian Buster -or newer. - Special use cases =================