Skip to content

Commit b3f87b9

Browse files
committed
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.
1 parent 19bc0e9 commit b3f87b9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

run_rust_emacs_tests.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,14 @@ elif [ ! $(which "$EMACS") ]; then
1919
exit 1
2020
fi
2121

22+
$( "$EMACS" -batch > /dev/null 2>&1 ) || {
23+
echo "Your emacs command ($EMACS) does not run properly."
24+
exit 2
25+
};
26+
27+
$( "$EMACS" -batch --eval "(require 'ert)" > /dev/null 2>&1 ) || {
28+
echo 'You must install the `ert` dependency; see README.md'
29+
exit 3
30+
};
31+
2232
"$EMACS" -batch -l rust-mode.el -l rust-mode-tests.el -f ert-run-tests-batch-and-exit

0 commit comments

Comments
 (0)