check-guile.in 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. set -e
  12. top_builddir=@top_builddir_absolute@
  13. top_srcdir=@top_srcdir_absolute@
  14. TEST_SUITE_DIR=${top_srcdir}/test-suite
  15. export TEST_SUITE_DIR
  16. if [ x"$1" = x-i ] ; then
  17. guile=$2
  18. shift
  19. shift
  20. else
  21. guile=${top_builddir}/meta/guile
  22. fi
  23. GUILE_LOAD_PATH=$TEST_SUITE_DIR
  24. export GUILE_LOAD_PATH
  25. if [ -f "$guile" -a -x "$guile" ] ; then
  26. echo Testing $guile ... "$@"
  27. echo with GUILE_LOAD_PATH=$GUILE_LOAD_PATH
  28. else
  29. echo ERROR: Cannot execute $guile
  30. exit 1
  31. fi
  32. # documentation searching ignores GUILE_LOAD_PATH.
  33. if [ ! -f guile-procedures.txt ] ; then
  34. @LN_S@ libguile/guile-procedures.txt .
  35. fi
  36. exec $guile \
  37. --debug \
  38. -L "$TEST_SUITE_DIR" \
  39. --no-auto-compile -e main -s "$TEST_SUITE_DIR/guile-test" \
  40. --test-suite "$TEST_SUITE_DIR/tests" \
  41. --log-file check-guile.log "$@"
  42. # check-guile ends here