emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/rust-mode 3878cc6 107/486: Allow user to override which em


From: ELPA Syncer
Subject: [nongnu] elpa/rust-mode 3878cc6 107/486: Allow user to override which emacs is used in run_rust_emacs_tests.sh
Date: Sat, 7 Aug 2021 09:24:59 -0400 (EDT)

branch: elpa/rust-mode
commit 3878cc670777514c5deb8691d882520009b47f24
Author: Felix S. Klock II <pnkfelix@pnkfx.org>
Commit: Felix S. Klock II <pnkfelix@pnkfx.org>

    Allow user to override which emacs is used in run_rust_emacs_tests.sh
    
    Namely, extend script so user can do, e.g.:
    ```
    % EMACS=/Applications/Emacs.app/Contents/MacOS/Emacs run_rust_emacs_tests.sh
    ```
---
 run_rust_emacs_tests.sh | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/run_rust_emacs_tests.sh b/run_rust_emacs_tests.sh
index b35fcf8..dc4458f 100755
--- a/run_rust_emacs_tests.sh
+++ b/run_rust_emacs_tests.sh
@@ -10,5 +10,13 @@
 # except according to those terms.
 #
 # This runs the test for emacs rust-mode.
-# It must be possible to find emacs via PATH.
-emacs -batch -l rust-mode.el -l rust-mode-tests.el -f 
ert-run-tests-batch-and-exit
+# Either $EMACS must be set, or it must be possible to find emacs via PATH.
+
+if [ -z "$EMACS" ]; then
+    EMACS=emacs
+elif [ ! $(which "$EMACS") ]; then
+   echo "You must set EMACS to a program that runs emacs."
+   exit 1
+fi
+
+"$EMACS" -batch -l rust-mode.el -l rust-mode-tests.el -f 
ert-run-tests-batch-and-exit



reply via email to

[Prev in Thread] Current Thread [Next in Thread]