emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] scratch/merge-cedet-tests c9de94f 064/316: * cit-test.sh:


From: Edward John Steere
Subject: [Emacs-diffs] scratch/merge-cedet-tests c9de94f 064/316: * cit-test.sh: Add support for running in batch mode.
Date: Fri, 27 Jan 2017 20:03:28 +0000 (UTC)

branch: scratch/merge-cedet-tests
commit c9de94f85bf4e0bdd97597a4272de74d2e1472d1
Author: David Engster <address@hidden>
Commit: Edward John Steere <address@hidden>

    * cit-test.sh: Add support for running in batch mode.
---
 test/manual/cedet/cit-test.sh |   25 +++++++++++++++++--------
 1 file changed, 17 insertions(+), 8 deletions(-)

diff --git a/test/manual/cedet/cit-test.sh b/test/manual/cedet/cit-test.sh
index 89d1568..53dd57d 100755
--- a/test/manual/cedet/cit-test.sh
+++ b/test/manual/cedet/cit-test.sh
@@ -1,18 +1,27 @@
 #!/bin/sh
 
-EMACS=${EMACS:-emacs};
+EMACS=${EMACS:-emacs}
 
-STYLE=$1;
+STYLE=$1
 if [ -z $1 ]; then
     STYLE=Make
 fi
 
+# Further Emacs options (like --batch)
+OPTIONS=$2
+
 rm -r /tmp/CEDET_INTEG*
 
-if $EMACS -q -l ../common/cedet.el -l cit-load.el -f toggle-debug-on-error  -f 
toggle-debug-on-quit -f cedet-integ-test-${STYLE}; then
-    # Reverse the meaning of a 0 exit status, as the user had to quit Emacs
-    # but on success, the program kills emacs with 1 (to be different.)
-    exit 1;
+$EMACS $OPTIONS -q -l ../common/cedet.el -l cit-load.el -f 
toggle-debug-on-error  -f toggle-debug-on-quit -f cedet-integ-test-${STYLE}
+EXITCODE=$?
+
+if [ $EXITCODE -eq 0 ]; then
+    # Reverse the meaning of a 0 exit status, as the user had to quit Emacs.
+    exit 1
+elif [ $EXITCODE -eq 1 ]; then
+    # On success, the program kills emacs with 1 (to be different.)
+    exit 0
 else
-    exit 0;
-fi
\ No newline at end of file
+    # Otherwise, Emacs might have an error running in batch mode, and we 
return it.
+    exit $EXITCODE
+fi



reply via email to

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