check-guile.in 1023 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #! /bin/sh
  2. # Usage: check-guile [-i GUILE-INTERPRETER] [GUILE-TEST-ARGS]
  3. # If `-i GUILE-INTERPRETER' is omitted, use ${top_builddir}/meta/guile.
  4. # See ${top_srcdir}/test-suite/guile-test for documentation on GUILE-TEST-ARGS.
  5. #
  6. # Example invocations:
  7. # ./check-guile
  8. # ./check-guile numbers.test
  9. # ./check-guile -i /usr/local/bin/guile
  10. # ./check-guile -i /usr/local/bin/guile numbers.test
  11. # ./check-guile -i meta/gdb-uninstalled-guile numbers.test
  12. set -e
  13. top_builddir=@top_builddir_absolute@
  14. top_srcdir=@top_srcdir_absolute@
  15. export TEST_SUITE_DIR="${top_srcdir}/test-suite"
  16. if [ x"$1" = x-i ] ; then
  17. guile="$2"
  18. shift 2
  19. else
  20. guile="${top_builddir}/meta/guile"
  21. fi
  22. export GUILE_LOAD_PATH="$TEST_SUITE_DIR"
  23. if ! [ -f "$guile" -a -x "$guile" ] ; then
  24. echo "ERROR: Cannot execute $guile" 1>&2
  25. exit 2
  26. fi
  27. exec "$guile" \
  28. --debug \
  29. -L "$TEST_SUITE_DIR" \
  30. --no-auto-compile -e main -s "$TEST_SUITE_DIR/guile-test" \
  31. --test-suite "$TEST_SUITE_DIR/tests" \
  32. --log-file check-guile.log "$@"