Allow run-tests.sh to skip tests

This change allows tests to be skipped for development purposes by
setting the environment variable `ERT_SELECTOR' to a valid ERT test
selector, e.g.:

  ERT_SELECTOR='(not "-fixfn")' ./run-tests.sh

Refer to the docstrings for `ert-run-tests-batch-and-exit' and
`ert-select-tests' for details on how to compose test selectors.
master
William West 11 years ago
parent 90056bd0f5
commit 7d7a457c48
  1. 12
      run-tests.sh

@ -6,13 +6,23 @@ if [ -z "$EMACS" ] ; then
EMACS="emacs"
fi
# Run all tests by default.
# To only run certain tests, set $ERT_SELECTOR as required.
# For example, to skip the test "-fixfn", run the following command:
#
# ERT_SELECTOR='(not "-fixfn")' ./run-tests.sh
#
if [ -z "$ERT_SELECTOR" ] ; then
ERT_SELECTOR="nil"
fi
$EMACS -batch \
$([[ $EMACS == "emacs23" ]] && echo -l dev/ert.el) \
-l dash.el \
-l dash-functional.el \
-l dev/examples-to-tests.el \
-l dev/examples.el \
-f ert-run-tests-batch-and-exit
--eval "(ert-run-tests-batch-and-exit (quote ${ERT_SELECTOR}))"
if [[ $EMACS != "emacs23" ]]; then
$EMACS -Q --batch \

Loading…
Cancel
Save