From c054020581c3cf998930cc021cd7a569691bcf9f Mon Sep 17 00:00:00 2001 From: Andrei Borzenkov Date: Sat, 7 Nov 2015 23:42:35 +0300 Subject: [PATCH] partmap_test: check that parted is available Skip test if parted is unavailable instead of returning false failure. --- tests/partmap_test.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/partmap_test.in b/tests/partmap_test.in index 7786ccfbc..4230ba228 100644 --- a/tests/partmap_test.in +++ b/tests/partmap_test.in @@ -92,6 +92,12 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in disk=hd0 ;; esac + +if ! which parted >/dev/null 2>&1; then + echo "parted not installed; cannot test partmap" + exit 77 +fi + imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1