From a6f41c35e337db192e612ee6e1545fcae4c69ac7 Mon Sep 17 00:00:00 2001 From: Philip Hands Date: Thu, 29 Jun 2017 22:11:09 +0200 Subject: lvc: grab updates from tails (01371c19bd..6ae59c49e5) Signed-off-by: Holger Levsen --- cucumber/features/step_definitions/totem.rb | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'cucumber/features/step_definitions/totem.rb') diff --git a/cucumber/features/step_definitions/totem.rb b/cucumber/features/step_definitions/totem.rb index 72698dde..a5b88d14 100644 --- a/cucumber/features/step_definitions/totem.rb +++ b/cucumber/features/step_definitions/totem.rb @@ -1,23 +1,24 @@ Given /^I create sample videos$/ do - @shared_video_dir_on_host = "#{$config["TMPDIR"]}/shared_video_dir" - @shared_video_dir_on_guest = "/tmp/shared_video_dir" - FileUtils.mkdir_p(@shared_video_dir_on_host) - add_after_scenario_hook { FileUtils.rm_r(@shared_video_dir_on_host) } + @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("avconv -loop 1 -t 30 -f image2 " + - "-i 'features/images/TailsBootSplash.png' " + + "-i 'features/images/USBTailsLogo.png' " + "-an -vcodec libx264 -y " + '-filter:v "crop=in_w-mod(in_w\,2):in_h-mod(in_h\,2)" ' + - "'#{@shared_video_dir_on_host}/video.mp4' >/dev/null 2>&1") + "'#{@video_dir_on_host}/video.mp4' >/dev/null 2>&1") end -Given /^I setup a filesystem share containing sample videos$/ do - $vm.add_share(@shared_video_dir_on_host, @shared_video_dir_on_guest) +Given /^I plug and mount a USB drive containing sample videos$/ do + @video_dir_on_guest = share_host_files( + Dir.glob("#{@video_dir_on_host}/*") + ) end Given /^I copy the sample videos to "([^"]+)" as user "([^"]+)"$/ do |destination, user| - for video_on_host in Dir.glob("#{@shared_video_dir_on_host}/*.mp4") do + for video_on_host in Dir.glob("#{@video_dir_on_host}/*.mp4") do video_name = File.basename(video_on_host) - src_on_guest = "#{@shared_video_dir_on_guest}/#{video_name}" + src_on_guest = "#{@video_dir_on_guest}/#{video_name}" dst_on_guest = "#{destination}/#{video_name}" step "I copy \"#{src_on_guest}\" to \"#{dst_on_guest}\" as user \"amnesia\"" end @@ -32,7 +33,7 @@ When /^I close Totem$/ do end Then /^I can watch a WebM video over HTTPs$/ do - test_url = 'https://webm.html5.org/test.webm' + test_url = 'https://tails.boum.org/lib/test_suite/test.webm' recovery_on_failure = Proc.new do step 'I close Totem' end -- cgit v1.2.3-70-g09d2