[slime-cvs] CVS slime
heller
heller at common-lisp.net
Fri Sep 19 09:48:29 UTC 2008
Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv7841
Modified Files:
ChangeLog slime.el test.sh
Log Message:
* slime.el (slime-batch-test): Accept test-name and randomize arguments.
* test.sh (usage): Accept -n and -S options.
--- /project/slime/cvsroot/slime/ChangeLog 2008/09/19 09:48:22 1.1524
+++ /project/slime/cvsroot/slime/ChangeLog 2008/09/19 09:48:29 1.1525
@@ -10,6 +10,9 @@
(slime-randomize-test-order): New variable.
(slime-shuffle-list): New function.
(slime-run-tests): Use it.
+ (slime-batch-test): Accept test-name and randomize arguments.
+
+ * test.sh (usage): Accept -n and -S options.
2008-09-18 Tobias C. Rittweiler <tcr at freebits.de>
--- /project/slime/cvsroot/slime/slime.el 2008/09/19 09:48:23 1.1032
+++ /project/slime/cvsroot/slime/slime.el 2008/09/19 09:48:29 1.1033
@@ -8612,7 +8612,7 @@
(message "%s" summary)
slime-unexpected-failures))))
-(defun slime-batch-test (results-file)
+(defun slime-batch-test (results-file &optional test-name randomize)
"Run the test suite in batch-mode.
Exits Emacs when finished. The exit code is the number of failed tests."
(let ((slime-test-debug-on-error nil))
@@ -8632,7 +8632,9 @@
(kill-emacs 252))))
(slime-sync-to-top-level 5)
(switch-to-buffer "*scratch*")
- (let ((failed-tests (slime-run-tests)))
+ (let ((slime-randomize-test-order (when randomize (random t) t))
+ (failed-tests (cond (test-name (slime-run-one-test test-name))
+ (t (slime-run-tests)))))
(with-current-buffer slime-test-buffer-name
(slime-delete-hidden-outline-text)
(goto-char (point-min))
--- /project/slime/cvsroot/slime/test.sh 2008/09/18 22:35:50 1.18
+++ /project/slime/cvsroot/slime/test.sh 2008/09/19 09:48:29 1.19
@@ -15,24 +15,30 @@
function usage () {
cat <<EOF
-Usage: $name [-b] [-s] [-R] [-T] <emacs> <lisp>"
+Usage: $name [-bsRTS] [-n <name>] <emacs> <lisp>"
-b use batch mode
-s use screen to hide emacs
-R don't show results file
-T no temp directory (use slime in current directory)
+ -S don't execute tests in random order (use default ordering)
+ -n <name> run only the test with name <name>
EOF
exit 1
}
name=$0
batch_mode="" # command line arg for emacs
+dump_results=true
use_temp_dir=true
-dump_results=false
+test_name=nil
+randomize=t
-while getopts bsRT opt; do
+while getopts bsRTn: opt; do
case $opt in
b) batch_mode="-batch";;
s) use_screen=true;;
+ n) test_name="'$OPTARG";;
+ S) randomize=nil;;
R) dump_results=false;;
T) use_temp_dir=false;;
*) usage;;
@@ -63,7 +69,7 @@
mkdir $tmpdir
if [ $use_temp_dir == true ] ; then
- cp -r $slimedir/*.{el,lisp} ChangeLog $slimedir/contrib $tmpdir
+ cp -r $slimedir/*.{el,lisp} ChangeLog $slimedir/contrib $tmpdir
fi
cmd=($emacs -nw -q -no-site-file $batch_mode --no-site-file
@@ -71,7 +77,7 @@
--eval "(add-to-list 'load-path \"$testdir\")"
--eval "(require 'slime)"
--eval "(setq inferior-lisp-program \"$lisp\")"
- --eval "(slime-batch-test \"$results\")")
+ --eval "(slime-batch-test \"$results\" $test_name $randomize)")
if [ "$use_screen" = "" ]; then
"${cmd[@]}"
More information about the slime-cvs
mailing list