From a33bdf051903cbb8d08cc7021c932e55642f9fb1 Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Fri, 6 Nov 2015 15:11:39 +0000 Subject: Allow arm64 without UEFI only if squash is set UEFI files do not go inside the squashfs, configured separately later. --- vmdebootstrap/uefi.py | 2 +- yarns/200-fast-tests.yarn | 28 ++++++++++++++++++++++++++++ yarns/900-implements.yarn | 3 +++ 3 files changed, 32 insertions(+), 1 deletion(-) 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 (.+) -- cgit v1.2.1