summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranonym <anonym@riseup.net>2016-01-19 01:48:07 +0100
committeranonym <anonym@riseup.net>2016-01-19 01:48:07 +0100
commit9017fbf10f816f50c1f53e0331a6ba60ed809dd0 (patch)
treec3609b6b7a334bcdbdc610ed9c1abd4a90d17082
parent3e1f38141483774355cca9f5cdb0c24979120f16 (diff)
Don't initialize new VMs excessively.test/10974-use-only-internal-snapshots
-rw-r--r--features/step_definitions/snapshots.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/features/step_definitions/snapshots.rb b/features/step_definitions/snapshots.rb
index b9d3cfd..d3da0d5 100644
--- a/features/step_definitions/snapshots.rb
+++ b/features/step_definitions/snapshots.rb
@@ -4,6 +4,7 @@ def checkpoints
:description => "I have started Tails from DVD without network and stopped at Tails Greeter's login screen",
:parent_checkpoint => nil,
:steps => [
+ 'a computer',
'the network is unplugged',
'I start the computer',
'the computer boots Tails'
@@ -153,7 +154,11 @@ def reach_checkpoint(name)
scenario_indent = " "*4
step_indent = " "*6
- step "a computer"
+ # If we run with --keep-snapshots and the first scenario we run
+ # happen to use a snapshot from a previous run, then the 'a
+ # computer' step won't have been run yet.
+ step "a computer" if $vm.nil?
+
if not VM.snapshot_exists?(name)
checkpoint = checkpoints[name]
checkpoint_description = checkpoint[:description]