diff options
| author | Felix S. Klock II <pnkfelix@pnkfx.org> | 2015-02-07 13:05:41 +0100 |
|---|---|---|
| committer | Felix S. Klock II <pnkfelix@pnkfx.org> | 2015-02-07 13:05:41 +0100 |
| commit | b3f87b903ab54190e1a4d1efe9b9dd87fab4ab3c (patch) | |
| tree | 41c8cd160b582c36c6c06a18ff061ffe954c648c /run_rust_emacs_tests.sh | |
| parent | 19bc0e9ef1dd72bfde10644037a13719a38777fc (diff) | |
| download | rust-mode-b3f87b903ab54190e1a4d1efe9b9dd87fab4ab3c.tar.gz | |
Make the test driver script a little more informative.
Namely, have it do a couple attempts to check if basic dependencies
are satisfied before jumping whole hog into the test script, and
provide a message pointing out the ERT dependency in particular.
Diffstat (limited to 'run_rust_emacs_tests.sh')
| -rwxr-xr-x | run_rust_emacs_tests.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/run_rust_emacs_tests.sh b/run_rust_emacs_tests.sh index dc4458f..c9c2e40 100755 --- a/run_rust_emacs_tests.sh +++ b/run_rust_emacs_tests.sh @@ -19,4 +19,14 @@ elif [ ! $(which "$EMACS") ]; then exit 1 fi +$( "$EMACS" -batch > /dev/null 2>&1 ) || { + echo "Your emacs command ($EMACS) does not run properly." + exit 2 +}; + +$( "$EMACS" -batch --eval "(require 'ert)" > /dev/null 2>&1 ) || { + echo 'You must install the `ert` dependency; see README.md' + exit 3 +}; + "$EMACS" -batch -l rust-mode.el -l rust-mode-tests.el -f ert-run-tests-batch-and-exit |
