partmap_test: check that parted is available

Skip test if parted is unavailable instead of returning false failure.
This commit is contained in:
Andrei Borzenkov 2015-11-07 23:42:35 +03:00
parent c7f93a20c4
commit c054020581

View file

@ -92,6 +92,12 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
disk=hd0 disk=hd0
;; ;;
esac 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 imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1
outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1