diff options
author | Neil Williams <codehelp@debian.org> | 2016-07-31 22:23:18 +0100 |
---|---|---|
committer | Neil Williams <codehelp@debian.org> | 2016-07-31 22:23:18 +0100 |
commit | 479f2395ba42813e284a15e442c38b8536155ce8 (patch) | |
tree | c49d7d93f896a2285fecc7d9d14cd21a2ab7370a /yarns/900-implements.yarn | |
parent | 5c0f1d11fb1bdeceffc0aa28e19673c82663a9ab (diff) | |
download | vmdebootstrap-479f2395ba42813e284a15e442c38b8536155ce8.tar.gz |
Update and expand the build tests
Still issues to fix with some of the scenarios
Diffstat (limited to 'yarns/900-implements.yarn')
-rw-r--r-- | yarns/900-implements.yarn | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/yarns/900-implements.yarn b/yarns/900-implements.yarn index 860d649..433c374 100644 --- a/yarns/900-implements.yarn +++ b/yarns/900-implements.yarn @@ -136,6 +136,28 @@ regular expression. trap "umount \"$mp\"; unkpartx_image \"$IMAGE\"" EXIT grep -P -e "$MATCH_3" "$mp/$MATCH_2" +Check that the partition contains a specified symlink. + + IMPLEMENTS THEN partition (\d+) has symlink (\S+) + device="$(kpartx_image_partition "$IMAGE" "$MATCH_1")" + trap "unkpartx_image \"$IMAGE\"" EXIT + mp="$(mktemp -d)" + mount -r "$device" "$mp" + trap "umount \"$mp\"; unkpartx_image \"$IMAGE\"" EXIT + stat "$mp/$MATCH_2" | + grep "symbolic link" + +Check that the partition contains a specified path. + + IMPLEMENTS THEN partition (\d+) has filename (\S+) + device="$(kpartx_image_partition "$IMAGE" "$MATCH_1")" + trap "unkpartx_image \"$IMAGE\"" EXIT + mp="$(mktemp -d)" + mount -r "$device" "$mp" + trap "umount \"$mp\"; unkpartx_image \"$IMAGE\"" EXIT + stat "$mp/$MATCH_2" | + grep "regular file" + Check the image output format IMPLEMENTS THEN image has file format matching (.+) |