summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vmdebootstrap/uefi.py2
-rw-r--r--yarns/200-fast-tests.yarn28
-rw-r--r--yarns/900-implements.yarn3
3 files changed, 32 insertions, 1 deletions
diff --git a/vmdebootstrap/uefi.py b/vmdebootstrap/uefi.py
index bf04ae8..674dd78 100644
--- a/vmdebootstrap/uefi.py
+++ b/vmdebootstrap/uefi.py
@@ -50,7 +50,7 @@ class Uefi(Base):
'You must specify use-uefi for esp-size to have effect')
if self.settings['arch'] in arch_table and\
arch_table[self.settings['arch']]['exclusive'] and\
- not self.settings['use-uefi']:
+ (not self.settings['use-uefi'] and not self.settings['squash']):
raise cliapp.AppException(
'Only UEFI is supported on %s' % self.settings['arch'])
elif self.settings['use-uefi'] and self.settings['arch'] not in arch_table:
diff --git a/yarns/200-fast-tests.yarn b/yarns/200-fast-tests.yarn
index 1b0ef97..7e91ab3 100644
--- a/yarns/200-fast-tests.yarn
+++ b/yarns/200-fast-tests.yarn
@@ -11,3 +11,31 @@ verify that vmdebootstrap parses the command line correctly.
THEN vmdebootstrap exited with a non-zero exit code
AND vmdebootstrap wrote an error message matching --squash
AND vmdebootstrap wrote an error message matching --image
+
+ SCENARIO --squash and --arch arm64 used together
+ ASSUMING fast tests are requested
+ WHEN user attempts to run vmdebootstrap
+ ... --squash=FOO --arch=arm64 --dry-run
+ THEN vmdebootstrap exited with a zero exit code
+
+ SCENARIO --use-uefi and --arch arm64 used together
+ ASSUMING fast tests are requested
+ WHEN user attempts to run vmdebootstrap
+ ... --image=FOO --grub --use-uefi --arch=arm64 --dry-run
+ THEN vmdebootstrap exited with a zero exit code
+
+ SCENARIO --use-uefi and --arch arm64 used without grub
+ ASSUMING fast tests are requested
+ WHEN user attempts to run vmdebootstrap
+ ... --image=FOO --use-uefi --arch=arm64 --dry-run
+ THEN vmdebootstrap exited with a non-zero exit code
+ AND vmdebootstrap wrote an error message matching UEFI
+ AND vmdebootstrap wrote an error message matching Grub
+
+ SCENARIO --use-uefi and --arch arm64 used without image
+ ASSUMING fast tests are requested
+ WHEN user attempts to run vmdebootstrap
+ ... --grub --use-uefi --arch=arm64 --dry-run
+ THEN vmdebootstrap exited with a non-zero exit code
+ AND vmdebootstrap wrote an error message matching disk image filename
+ AND vmdebootstrap wrote an error message matching squash
diff --git a/yarns/900-implements.yarn b/yarns/900-implements.yarn
index 72c8f2c..d4c6a7a 100644
--- a/yarns/900-implements.yarn
+++ b/yarns/900-implements.yarn
@@ -58,6 +58,9 @@ code.
IMPLEMENTS THEN vmdebootstrap exited with a non-zero exit code
grep -vFx 0 vmdebootstrap.exit
+ IMPLEMENTS THEN vmdebootstrap exited with a zero exit code
+ grep -Fx 0 vmdebootstrap.exit
+
Check the stderr of the attempted vmdebootstrap run.
IMPLEMENTS THEN vmdebootstrap wrote an error message matching (.+)