Move all tests to a single directory for "make check".
git-svn-id: svn://svn.zoy.org/elk/trunk@275 55e467fa-43c5-0310-a8a2-de718669efc6
This commit is contained in:
parent
776c2c2fcc
commit
0948041886
|
@ -22,6 +22,9 @@ stamp-*
|
||||||
# Configure-generated files
|
# Configure-generated files
|
||||||
include/site.h
|
include/site.h
|
||||||
scm/slib.scm
|
scm/slib.scm
|
||||||
|
test/check-gc
|
||||||
|
test/check-gc2
|
||||||
|
test/check-r4rs
|
||||||
# Build-generated files
|
# Build-generated files
|
||||||
src/elk
|
src/elk
|
||||||
lib/xwidgets/xaw/*.c
|
lib/xwidgets/xaw/*.c
|
||||||
|
|
11
configure.ac
11
configure.ac
|
@ -571,7 +571,7 @@ AM_CONDITIONAL(HAVE_GROFF, test "${ac_cv_my_have_groff}" = "yes")
|
||||||
dnl
|
dnl
|
||||||
dnl Finished!
|
dnl Finished!
|
||||||
dnl
|
dnl
|
||||||
AC_OUTPUT([
|
AC_CONFIG_FILES([
|
||||||
Makefile
|
Makefile
|
||||||
doc/Makefile
|
doc/Makefile
|
||||||
doc/bitstring/Makefile
|
doc/bitstring/Makefile
|
||||||
|
@ -587,7 +587,6 @@ AC_OUTPUT([
|
||||||
doc/xlib/Makefile
|
doc/xlib/Makefile
|
||||||
doc/xt/Makefile
|
doc/xt/Makefile
|
||||||
examples/Makefile
|
examples/Makefile
|
||||||
examples/tests/Makefile
|
|
||||||
include/Makefile
|
include/Makefile
|
||||||
lib/Makefile
|
lib/Makefile
|
||||||
lib/misc/Makefile
|
lib/misc/Makefile
|
||||||
|
@ -599,10 +598,16 @@ AC_OUTPUT([
|
||||||
scm/Makefile
|
scm/Makefile
|
||||||
src/Makefile
|
src/Makefile
|
||||||
test/Makefile
|
test/Makefile
|
||||||
|
])
|
||||||
|
AC_CONFIG_FILES([
|
||||||
scm/slib.scm
|
scm/slib.scm
|
||||||
include/site.h
|
include/site.h
|
||||||
])
|
])
|
||||||
|
AC_CONFIG_FILES([test/check-gc], [chmod 0755 test/check-gc])
|
||||||
|
AC_CONFIG_FILES([test/check-gc2], [chmod 0755 test/check-gc2])
|
||||||
|
AC_CONFIG_FILES([test/check-r4rs], [chmod 0755 test/check-r4rs])
|
||||||
|
|
||||||
|
AC_OUTPUT
|
||||||
|
|
||||||
cat << EOF
|
cat << EOF
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
NULL =
|
NULL =
|
||||||
|
|
||||||
SUBDIRS = tests
|
|
||||||
EXTRA_DIST = $(DATA)
|
EXTRA_DIST = $(DATA)
|
||||||
|
|
||||||
examplesdir = $(datadir)/doc/@PACKAGE@/examples
|
examplesdir = $(datadir)/doc/@PACKAGE@/examples
|
||||||
|
@ -43,12 +42,6 @@ scheme_DATA = \
|
||||||
scheme/unify.scm \
|
scheme/unify.scm \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
testsdir = $(examplesdir)/tests
|
|
||||||
tests_DATA = \
|
|
||||||
tests/README \
|
|
||||||
tests/r4rstest.scm \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
unixdir = $(examplesdir)/unix
|
unixdir = $(examplesdir)/unix
|
||||||
unix_DATA = \
|
unix_DATA = \
|
||||||
unix/pipsiz.scm \
|
unix/pipsiz.scm \
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
|
|
||||||
CLEANFILES = $(allstamps) mytest.scm tmp1 tmp2 tmp3
|
|
||||||
|
|
||||||
allstamps = stamp-r4rs stamp-gc
|
|
||||||
|
|
||||||
if NATIVE_BUILD
|
|
||||||
check-local: $(allstamps)
|
|
||||||
endif
|
|
||||||
|
|
||||||
stamp-r4rs: $(top_builddir)/src/elk
|
|
||||||
rm -f $@ mytest.scm
|
|
||||||
sed -e 's/r4rstest/mytest/g' < $(srcdir)/r4rstest.scm > mytest.scm
|
|
||||||
echo '(test-cont) (test-sc4) (test-delay)' >> mytest.scm
|
|
||||||
-$(top_builddir)/src/elk -p .:$(top_srcdir)/scm -l mytest.scm
|
|
||||||
rm -f mytest.scm tmp1 tmp2 tmp3
|
|
||||||
printf "" > $@
|
|
||||||
|
|
||||||
stamp-gc: $(top_builddir)/src/elk
|
|
||||||
-$(top_builddir)/src/elk -p .:$(top_srcdir)/scm -l gc-stress.scm
|
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
|
|
||||||
;; this test sometimes crashes the GC with the well-known
|
|
||||||
;; Panic: Visit: object not in prev space at 0x40210b2c ('pair') 8199 8201 (dumping core).
|
|
||||||
|
|
||||||
(display "testing garbage collector integrity (1000 loops)\n")
|
|
||||||
;(set! garbage-collect-notify? #t)
|
|
||||||
(define c 0)
|
|
||||||
(define cb
|
|
||||||
(lambda ignore
|
|
||||||
(let ((s '()))
|
|
||||||
(set! c (+ 1 c))
|
|
||||||
(call/cc
|
|
||||||
(lambda (return)
|
|
||||||
(do ((i 0 (+ i 1)))
|
|
||||||
((= i 100))
|
|
||||||
(let ((a (+ i 1)))
|
|
||||||
(set! s (append s (list i))))
|
|
||||||
(if (= i 60) (return #t))))))))
|
|
||||||
(do ((i 0 (+ i 1))) ((= i 1000)) (cb))
|
|
||||||
(display "test passed.\n")
|
|
||||||
|
|
||||||
;; This test used to crash the GC, too.
|
|
||||||
|
|
||||||
(display "testing deep calls (2000 calls)\n")
|
|
||||||
(define crash
|
|
||||||
(lambda (x)
|
|
||||||
(begin
|
|
||||||
(if (> x 0)
|
|
||||||
(crash (- x 1)))
|
|
||||||
(collect))))
|
|
||||||
(crash 2000)
|
|
||||||
(display "test passed.\n")
|
|
||||||
|
|
|
@ -1,6 +1,12 @@
|
||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
EXTRA_DIST = check-build
|
EXTRA_DIST = README check-build r4rstest.scm \
|
||||||
|
check-gc.in check-gc2.in check-r4rs.in
|
||||||
|
DISTCLEANFILES = check-gc check-gc2 check-r4rs
|
||||||
|
|
||||||
TESTS = check-build
|
if NATIVE_BUILD
|
||||||
|
native_tests = check-gc check-gc2 check-r4rs
|
||||||
|
endif
|
||||||
|
|
||||||
|
TESTS = check-build $(native_tests)
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# this test sometimes crashes the GC with the well-known
|
||||||
|
# Panic: Visit: object not in prev space at 0x40210b2c ('pair') 8199 8201 (dumping core).
|
||||||
|
|
||||||
|
cat << EOF | @top_builddir@/src/elk -p .:@top_srcdir@/scm -l -
|
||||||
|
|
||||||
|
(display "testing garbage collector integrity (10000 loops)\n")
|
||||||
|
;(set! garbage-collect-notify? #t)
|
||||||
|
(define c 0)
|
||||||
|
(define cb
|
||||||
|
(lambda ignore
|
||||||
|
(let ((s '()))
|
||||||
|
(set! c (+ 1 c))
|
||||||
|
(call/cc
|
||||||
|
(lambda (return)
|
||||||
|
(do ((i 0 (+ i 1)))
|
||||||
|
((= i 100))
|
||||||
|
(let ((a (+ i 1)))
|
||||||
|
(set! s (append s (list i))))
|
||||||
|
(if (= i 60) (return #t))))))))
|
||||||
|
(do ((i 0 (+ i 1))) ((= i 10000)) (cb))
|
||||||
|
(display "test passed.\n")
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# This test used to crash the GC.
|
||||||
|
|
||||||
|
cat << EOF | @top_builddir@/src/elk -p .:@top_srcdir@/scm -l -
|
||||||
|
|
||||||
|
(display "testing deep calls (2000 calls)\n")
|
||||||
|
(define crash
|
||||||
|
(lambda (x)
|
||||||
|
(begin
|
||||||
|
(if (> x 0)
|
||||||
|
(crash (- x 1)))
|
||||||
|
(collect))))
|
||||||
|
(crash 2000)
|
||||||
|
(display "test passed.\n")
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
(cat @srcdir@/r4rstest.scm; echo '(test-cont) (test-sc4) (test-delay)') \
|
||||||
|
| @top_builddir@/src/elk -p .:@top_srcdir@/scm -l -
|
||||||
|
rm -f tmp1 tmp2 tmp3
|
||||||
|
|
Loading…
Reference in New Issue