branch: externals/dash
commit db784f817a9143ca2d3ec8402b793d078c71a226
Merge: 90056bd 7d7a457
Author: Magnar Sveen <[email protected]>
Commit: Magnar Sveen <[email protected]>

    Merge pull request #124 from occidens/skiptests
    
    Allow run-tests.sh to skip tests
---
 run-tests.sh |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/run-tests.sh b/run-tests.sh
index edaffe3..3a0a024 100755
--- a/run-tests.sh
+++ b/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 \

Reply via email to