Permalink
Browse files

Makefile fixes; test twiddling

Reduce the number of parallel tests on Windows to 2 (from 3).

Cleanup of makefile for Windows.

Change-Id: Idd921f4084b9a2b51c0d8bd0a66a899051b56edb
  • Loading branch information...
1 parent 036b2b8 commit e8fae452be6f9bf871cd9f2b57a7dc8c9430774e @dklayer dklayer committed Jun 7, 2012
Showing with 46 additions and 29 deletions.
  1. +36 −25 makefile
  2. +10 −4 test/t-aserve.cl
View
@@ -8,63 +8,74 @@ on_windows = $(shell if test -d "c:/"; then echo yes; else echo no; fi)
use_dcl = $(shell if test -f ../dcl.dxl; then echo yes; else echo no; fi)
ifeq ($(use_dcl),yes)
-mlisp = ../lisp -I dcl.dxl
+mlisp = ../lisp
+image = dcl.dxl
endif
-ifndef mlisp
ifeq ($(on_windows),yes)
-mlisp = "/cygdrive/c/Program Files/acl81/mlisp.exe" +B +cn
+mlisp ?= "/cygdrive/c/acl82/mlisp.exe"
else
-mlisp = /fi/cl/8.2/bin/mlisp
+mlisp ?= /fi/cl/8.2/bin/mlisp
endif
+
+image ?= mlisp.dxl
+
+ifeq ($(on_windows),yes)
+mlisp += +B +cn +P # +M
endif
+mlisp += -I $(image)
+
+# -batch must come before -L, since arguments are evaluated from left to right
+mlisp += -batch
build: FORCE
rm -f build.tmp
echo '(setq excl::*break-on-warnings* t)' >> build.tmp
echo '(load "load.cl")' >> build.tmp
echo '(make-aserve.fasl)' >> build.tmp
-# -batch must come before -L, since arguments are evaluated from left to right
- $(mlisp) -batch -L build.tmp -kill
+ $(mlisp) -L build.tmp -kill
-# On an SMP machine with SML ACL, adjust values for number of processors.
-NSERVERS = 1
+# Can be used to change the number of parallel test runs:
+#NSERVERS = :n 1
-test: FORCE
- rm -f build.tmp
- echo '(dribble "test.out")' >> build.tmp
- echo '(setq excl::*break-on-warnings* t)' >> build.tmp
- echo '(setq util.test::*break-on-test-failures* t)' >> build.tmp
- echo '(load "load.cl")' >> build.tmp
- echo '(setq user::*do-aserve-test* nil)' >> build.tmp
- echo '(load "test/t-aserve.cl")' >> build.tmp
- echo '(time (test-aserve-n :n $(NSERVERS) :exit t))' >> build.tmp
-# -batch must come before -L, since arguments are evaluated from left to right
- $(mlisp) -batch -L build.tmp -kill
+test.tmp: FORCE
+ rm -f test.tmp
+ echo '(dribble "test.out")' >> test.tmp
+ echo '(setq excl::*break-on-warnings* t)' >> test.tmp
+ echo '(setq util.test::*break-on-test-failures* t)' >> test.tmp
+ echo '(load "load.cl")' >> test.tmp
+ echo '(setq user::*do-aserve-test* nil)' >> test.tmp
+ echo '(load "test/t-aserve.cl")' >> test.tmp
+
+test: test.tmp
+ echo '(time (test-aserve-n :n 1 :exit t))' >> test.tmp
+ $(mlisp) -L test.tmp -kill
+
+testsmp: test.tmp
+ echo '(time (test-aserve-n $(NSERVERS) :exit t))' >> test.tmp
+ $(mlisp) -L test.tmp -kill
test-from-asdf: FORCE
rm -f build.tmp
+ echo '(dribble "test.out")' >> build.tmp
echo '(setq excl::*break-on-warnings* t)' >> build.tmp
echo '(require :tester)' >> build.tmp
echo '(setq util.test::*break-on-test-failures* t)' >> build.tmp
echo '(require :asdf)' >> build.tmp
echo "(asdf:operate 'asdf:load-op :aserve)" >> build.tmp
- echo '(dribble "test.out")' >> build.tmp
echo '(time (load "test/t-aserve.cl"))' >> build.tmp
echo '(exit util.test::*test-errors*)' >> build.tmp
-# -batch must come before -L, since arguments are evaluated from left to right
- $(mlisp) -batch -L build.tmp -kill
+ $(mlisp) -L build.tmp -kill
srcdist: FORCE
rm -f build.tmp
echo '(setq excl::*break-on-warnings* t)' >> build.tmp
echo '(load "load.cl")' >> build.tmp
echo '(make-src-distribution "aserve")' >> build.tmp
-# -batch must come before -L, since arguments are evaluated from left to right
- $(mlisp) -batch -L build.tmp -kill
+ $(mlisp) -L build.tmp -kill
clean: FORCE
- rm -f build.tmp
+ rm -f *.tmp
find . -name '*.fasl' -print | xargs rm -f
cleanall distclean: clean
View
@@ -145,7 +145,11 @@
(mp:process-thread mp:*current-process*)))
""))
-(defun user::test-aserve-n (&key n (test-timeouts *test-timeouts*) (delay 0) logs
+(defun user::test-aserve-n (&key (n
+ #+(and smp microsoft-32) 2
+ #-(and smp microsoft-32) 5
+ #-smp 1)
+ (test-timeouts *test-timeouts*) (delay 0) logs
(direct t) (proxy t) (proxyproxy t) (ssl t)
(name "ast") (log-name nil l-n-p)
(wait t) ; wait for tests to finish
@@ -221,9 +225,11 @@
(lambda (p) (eq :terminated (mp::process-state p)))
p))))))
(when wait
- (if* exit
- then (exit util.test::*test-errors* :quiet t)
- else util.test::*test-errors*)))
+ (let ((code (+ util.test::*test-unexpected-failures*
+ util.test::*test-errors*)))
+ (if* exit
+ then (exit code :quiet t)
+ else code))))
(defvar *asc-lock* (mp:make-process-lock :name "asc"))
(defun asc-format (fmt &rest args)

0 comments on commit e8fae45

Please sign in to comment.