summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranonym <anonym@riseup.net>2016-11-29 20:45:46 +0100
committeranonym <anonym@riseup.net>2016-11-29 20:45:46 +0100
commitcba26589b3d64927fa52498b26936ed302e488a5 (patch)
treed3b5d701477af2ecfc842d9996651a156ad9fdd8
parent76becb81f898517c9d96fb5440604ab92616e0c6 (diff)
Be more careful when identifying unupgradable devices.
Now we also accept if the error is shown but for *other* devices than the target device.
-rw-r--r--features/step_definitions/usb.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/features/step_definitions/usb.rb b/features/step_definitions/usb.rb
index 9a58653..f349f62 100644
--- a/features/step_definitions/usb.rb
+++ b/features/step_definitions/usb.rb
@@ -78,7 +78,10 @@ end
def usb_install_helper(name)
@screen.wait('USBTailsLogo.png', 10)
- if @screen.exists("USBCannotUpgrade.png")
+ text = Dogtail::Application.new('tails-installer')
+ .child('', roleName: 'text').text
+ dev = $vm.disk_dev(name)
+ if text.match(/It is impossible to upgrade the device .+ #{dev}\d* /)
raise UpgradeNotSupported
end
begin