/[slime]/slime/test.sh
ViewVC logotype

Contents of /slime/test.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations)
Fri Oct 17 19:45:27 2003 UTC (10 years, 6 months ago) by lgorrie
Branch: MAIN
CVS Tags: SLIME-0-5, BACKHACKATTACK-1, SLIME-0-9, SLIME-0-8, SLIME-0-7, SLIME-0-10, SLIME-0-6
Branch point for: backhackattack-1
Changes since 1.3: +4 -1 lines
File MIME type: application/x-sh
When the test fails to complete, print "crashed" instead of reporting
nonsense.
1 lgorrie 1.1 #!/bin/sh
2    
3     # Run the SLIME test suite in batch mode, saving the results to a file.
4    
5     # This script's exit status is the number of tests failed. If no tests
6     # fail then no output is printed. If at least one test fails then a
7     # one-line summary is printed.
8    
9     # If something unexpected fails, you might get an exit code like 127
10     # or 255 instead. Sorry.
11    
12     if [ $# != 4 ]; then
13     echo "Usage: $0 <emacs> <lisp> <dribble-file> <results-file>"
14     exit 1
15     fi
16    
17     emacs=$1; lisp=$2; dribble=$3; results=$4
18     slimedir=$(dirname $0)
19    
20     # Move the code into a directory in /tmp, so that we can compile it
21     # for the current lisp.
22    
23     testdir=/tmp/slime-test.$$
24     test -d $testdir && rm -r $testdir
25     trap "rm -r $testdir" EXIT # remove temporary directory on exit
26    
27     mkdir $testdir
28     cp $slimedir/*.el $slimedir/*.lisp $testdir
29    
30     # you can remove "--batch" to get an emacs window for troubleshooting.
31     $emacs --batch --no-site-file --no-init-file \
32 lgorrie 1.2 --eval "(setq debug-on-quit t)" \
33 lgorrie 1.3 --eval "(setq max-lisp-eval-depth 1000)" \
34 lgorrie 1.1 --eval "(setq load-path (cons \"$testdir\" load-path))" \
35     --eval "(require 'slime)" \
36     --eval "(setq inferior-lisp-program \"$lisp\")" \
37     --eval "(slime-batch-test \"${results}\")" \
38     &> $dribble \
39    
40     status=$?
41    
42 lgorrie 1.4 if [ -f $results ]; then
43 lgorrie 1.1 echo $status "test(s) failed."
44 lgorrie 1.4 else
45     # Tests crashed
46     echo crashed
47 lgorrie 1.1 fi
48    
49     exit $status
50    

  ViewVC Help
Powered by ViewVC 1.1.5