diff options
author | Neil Williams <codehelp@debian.org> | 2015-12-19 15:05:53 +0000 |
---|---|---|
committer | Neil Williams <codehelp@debian.org> | 2015-12-19 15:05:53 +0000 |
commit | 017986eb02acea713e633a486dfeb308679035f6 (patch) | |
tree | 4a1e356432e561f35cea260b2ac7a16db1e8e152 /yarns | |
parent | 95048ea4631d15756de8edaadbef728820d921c0 (diff) | |
download | vmdebootstrap-017986eb02acea713e633a486dfeb308679035f6.tar.gz |
Ensure no-kernel works.
Closes: #808358
Add package inclusion functions to the fast tests
and dry-run output.
Diffstat (limited to 'yarns')
-rw-r--r-- | yarns/200-fast-tests.yarn | 38 | ||||
-rw-r--r-- | yarns/900-implements.yarn | 11 |
2 files changed, 48 insertions, 1 deletions
diff --git a/yarns/200-fast-tests.yarn b/yarns/200-fast-tests.yarn index fcfba2a..89a01e8 100644 --- a/yarns/200-fast-tests.yarn +++ b/yarns/200-fast-tests.yarn @@ -100,3 +100,41 @@ verify that vmdebootstrap parses the command line correctly. AND vmdebootstrap wrote an error message matching Only amd64 AND vmdebootstrap wrote an error message matching supports UEFI AND vmdebootstrap wrote an error message matching Wheezy + + SCENARIO default includes the kernel package + ASSUMING fast tests are requested + WHEN user attempts to run vmdebootstrap + ... --image=FOO --arch=amd64 --dry-run + THEN vmdebootstrap exited with a zero exit code + AND vmdebootstrap wrote a message matching linux-image-amd64 + + SCENARIO no-linux omits the kernel package + ASSUMING fast tests are requested + WHEN user attempts to run vmdebootstrap + ... --no-kernel --image=FOO --arch=amd64 --dry-run + THEN vmdebootstrap exited with a zero exit code + AND vmdebootstrap wrote a message not matching linux-image-amd64 + + SCENARIO kernel-package includes the kernel package + ASSUMING fast tests are requested + WHEN user attempts to run vmdebootstrap + ... --kernel-package unlikely --image=FOO --arch=amd64 --dry-run + THEN vmdebootstrap exited with a zero exit code + AND vmdebootstrap wrote a message not matching linux-image-amd64 + AND vmdebootstrap wrote a message matching unlikely + + SCENARIO no-kernel overrides kernel-package + ASSUMING fast tests are requested + WHEN user attempts to run vmdebootstrap + ... --no-kernel --kernel-package unlikely --image=FOO --arch=amd64 --dry-run + THEN vmdebootstrap exited with a zero exit code + AND vmdebootstrap wrote a message not matching linux-image-amd64 + AND vmdebootstrap wrote a message not matching unlikely + + SCENARIO package includes the specified package + ASSUMING fast tests are requested + WHEN user attempts to run vmdebootstrap + ... --package unlikely --image=FOO --arch=amd64 --dry-run + THEN vmdebootstrap exited with a zero exit code + AND vmdebootstrap wrote a message matching linux-image-amd64 + AND vmdebootstrap wrote a message matching unlikely diff --git a/yarns/900-implements.yarn b/yarns/900-implements.yarn index 9806619..9f3d92b 100644 --- a/yarns/900-implements.yarn +++ b/yarns/900-implements.yarn @@ -50,7 +50,7 @@ code and stderr. IMPLEMENTS WHEN user attempts to run vmdebootstrap (.*) if PYTHONPATH="$SRCDIR" "$SRCDIR/bin/vmdebootstrap" \ - $MATCH_1 2> vmdebootstrap.stderr + $MATCH_1 2> vmdebootstrap.stderr 1>vmdebootstrap.stdout then echo 0 > vmdebootstrap.exit else @@ -71,6 +71,15 @@ Check the stderr of the attempted vmdebootstrap run. IMPLEMENTS THEN vmdebootstrap wrote an error message matching (.+) grep -P -e "$MATCH_1" vmdebootstrap.stderr +Check the stdout of the dry-run vmdebootstrap run. + + IMPLEMENTS THEN vmdebootstrap wrote a message matching (.+) + grep -P -e "$MATCH_1" vmdebootstrap.stdout + +Exclude a pattern from the stdout of the dry-run vmdebootstrap run. + + IMPLEMENTS THEN vmdebootstrap wrote a message not matching (.+) + grep -P -v -e "$MATCH_1" vmdebootstrap.stdout ## Static tests on disk images |