From 479f2395ba42813e284a15e442c38b8536155ce8 Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Sun, 31 Jul 2016 22:23:18 +0100 Subject: Update and expand the build tests Still issues to fix with some of the scenarios --- yarns/900-implements.yarn | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'yarns/900-implements.yarn') 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 (.+) -- cgit v1.2.1