3 # create a randome file
4 empty
="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX
"`" ||
exit 1
5 non_empty
="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX
"`" ||
exit 1
10 .
"@builddir@/grub-core/modinfo.sh"
12 if [ x
"${grub_modinfo_platform}" = xemu
]; then
13 grub_empty
="(host)$empty"
14 grub_non_empty
="(host)$non_empty"
15 grub_dir
="(host)${TMPDIR:-/tmp}"
17 grub_empty
="/boot/empty"
18 grub_non_empty
="/boot/non_empty"
23 outfile
="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX
"`" ||
exit 1
24 @builddir@
/grub-shell
--files=$grub_empty=$empty --files=$grub_non_empty=$non_empty>$outfile <<EOF
25 if ! test -f $grub_empty; then
28 if ! test -e $grub_empty; then
31 if test -d $grub_empty; then
34 if ! test -d $grub_dir; then
37 if test -s $grub_empty; then
40 if ! test -s $grub_non_empty; then
43 if test -f $grub_empty -a foo = bar; then
46 if test -e $grub_empty -a foo = bar; then
49 if test -s $grub_non_empty -a foo = bar; then
52 if test -d $grub_dir -a foo = bar; then
58 rm -f "$empty" "$non_empty"
60 if grep FAIL
"$outfile" > /dev
/null
2>&1; then
61 echo "GRUB test command file tests failed."