grub2: bring back build of aros-side grub2 tools
[AROS.git] / arch / all-pc / boot / grub2-aros / tests / grub_cmd_set_date.in
blobc594ae3fc14ebf7a6be86b90f4d048747383a69f
1 #! /bin/bash
2 set -e
4 . "@builddir@/grub-core/modinfo.sh"
6 case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
7 # FIXME: OpenBIOS on sparc64 doesn't implement RTC
8 sparc64-ieee1275)
9 exit 0;;
10 # PLATFORM: ARC doesn't provide any way to set time
11 *-arc)
12 exit 0;;
13 # PLATFORM: EMU doesn't provide any way to set time
14 # Even if it did we'd need some kind of sandbox to avoid
15 # modifying real system time.
16 *-emu)
17 exit 0;;
18 esac
20 out=$(cat <<EOF | @builddir@/grub-shell
21 insmod datehook
22 date
23 if [ \$YEAR = 2004 -a \$MONTH = 4 -a \$DAY = 4 -a \$HOUR = 20 -a \$MINUTE = 47 ]; then
24 hello
25 halt
27 date 2004-04-04 20:47:00
28 reboot
29 EOF
32 if [ "$(echo "$out" | tail -n 1)" != "Hello World" ]; then
33 echo "Test failed: $out"
34 exit 1