4 # create a randome file
5 empty="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99
6 non_empty="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99
11 . "@builddir@/grub-core/modinfo.sh"
13 if [ x"${grub_modinfo_platform}" = xemu ]; then
14 grub_empty="(host)$empty"
15 grub_non_empty="(host)$non_empty"
16 grub_dir="(host)${TMPDIR:-/tmp}"
18 grub_empty="/boot/empty"
19 grub_non_empty="/boot/non_empty"
24 outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99
25 @builddir@/grub-shell --files=$grub_empty=$empty --files=$grub_non_empty=$non_empty>$outfile <<EOF
26 if ! test -f $grub_empty; then
29 if ! test -e $grub_empty; then
32 if test -d $grub_empty; then
35 if ! test -d $grub_dir; then
38 if test -s $grub_empty; then
41 if ! test -s $grub_non_empty; then
44 if test -f $grub_empty -a foo = bar; then
47 if test -e $grub_empty -a foo = bar; then
50 if test -s $grub_non_empty -a foo = bar; then
53 if test -d $grub_dir -a foo = bar; then
59 rm -f "$empty" "$non_empty"
61 if grep FAIL "$outfile" > /dev/null 2>&1; then
62 echo "GRUB test command file tests failed."