check-guile.in 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. -l ${top_builddir}/libguile/stack-limit-calibration.scm \
  37. -e main -s "$TEST_SUITE_DIR/guile-test" \
  38. --test-suite "$TEST_SUITE_DIR/tests" \
  39. --log-file check-guile.log "$@"
  40. # check-guile ends here