grub_func_test.in 730 B

1234567891011121314151617181920212223242526272829
  1. #! @BUILD_SHEBANG@
  2. set -e
  3. . "@builddir@/grub-core/modinfo.sh"
  4. if [ ! -e "@builddir@/"unicode.pf2 ]; then
  5. echo "Functional test requires grub-mkfont support"
  6. exit 99
  7. fi
  8. case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
  9. # PLATFORM: Max RAM is 256M
  10. mips-qemu_mips | mipsel-qemu_mips)
  11. mem=256M;;
  12. loongarch64-efi)
  13. mem=3G;;
  14. *)
  15. mem=512M;;
  16. esac
  17. # Increase memory as some of tests are high-resolution and need a lot of memory.
  18. out=`echo all_functional_test | @builddir@/grub-shell --timeout=3600 --files="/boot/grub/fonts/unicode.pf2"="@builddir@/"unicode.pf2 --qemu-opts="-m $mem"`
  19. if [ "$(echo "$out" | tail -n 1)" != "ALL TESTS PASSED" ]; then
  20. echo "Functional test failure: $out"
  21. exit 1
  22. fi