check-guile.in 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #! /bin/sh
  2. # Usage: check-guile [-i GUILE-INTERPRETER] [GUILE-TEST-ARGS]
  3. # If `-i GUILE-INTERPRETER' is omitted, use ${top_builddir}/pre-inst-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. if [ x"$1" = x-i ] ; then
  16. guile=$2
  17. shift
  18. shift
  19. else
  20. guile=${top_builddir}/pre-inst-guile
  21. fi
  22. GUILE_LOAD_PATH=$TEST_SUITE_DIR
  23. export GUILE_LOAD_PATH
  24. if [ -f "$guile" -a -x "$guile" ] ; then
  25. echo Testing $guile ... "$@"
  26. echo with GUILE_LOAD_PATH=$GUILE_LOAD_PATH
  27. else
  28. echo ERROR: Cannot execute $guile
  29. exit 1
  30. fi
  31. # documentation searching ignores GUILE_LOAD_PATH.
  32. if [ ! -f guile-procedures.txt ] ; then
  33. @LN_S@ libguile/guile-procedures.txt .
  34. fi
  35. exec $guile \
  36. -e main -s "$TEST_SUITE_DIR/guile-test" \
  37. --test-suite "$TEST_SUITE_DIR/tests" \
  38. --log-file check-guile.log "$@"
  39. # check-guile ends here