Add ansi-test to tests

This commit is contained in:
Tarn W. Burton 2024-01-14 13:20:52 -05:00
parent 5b4e355697
commit 417cf25bc4
No known key found for this signature in database
GPG key ID: B4E3D65DE1CE325A
3 changed files with 83 additions and 7 deletions

View file

@ -2,17 +2,29 @@
# vim: set filetype=makefile tabstop=8 shiftwidth=4 expandtab:
ECL=@prefix@/@bindir@/ecl@EXEEXT@
SHELL=/bin/bash -o pipefail
.PHONY: all
.PHONY: all check test ansi-test
all: check
check: config.lsp
$(ECL) -norc \
-load config.lsp \
-eval "(ecl-tests::run-tests '($(TESTS)))" \
-eval "(ext:quit)" \
2>&1 | tee check.log
check: test ansi-test
test: config.lsp
$(ECL) --norc \
--load config.lsp \
--eval "(ecl-tests::run-tests '($(TESTS)))" \
--eval "(ext:quit)" \
2>&1 | tee test.log
clean:
rm -rf regressions.log cache
ansi-test/doit.lsp:
git clone https://gitlab.common-lisp.net/ansi-test/ansi-test.git
ansi-test: ansi-test/doit.lsp
$(ECL) --norc \
--load config.lsp \
--eval "(ext:quit (if (ecl-tests::run-ansi-test) 0 2))" \
2>&1 | tee ansi-test.log

View file

@ -0,0 +1,31 @@
:NIL-VECTORS-ARE-STRINGS
:ALLOW-NIL-ARRAYS
:MAKE-CONDITION-WITH-COMPOUND-NAME
:NO-FLOATING-POINT-UNDERFLOW-BY-DEFAULT
LOOP.1.40
LOOP.1.41
LOOP.1.42
LOOP.1.43
MAKE-LOAD-FORM.ORDER.8
MAKE-LOAD-FORM.ORDER.13
MAKE-LOAD-FORM.ORDER.14
DEFGENERIC.ERROR.20
DEFGENERIC.ERROR.21
CALL-NEXT-METHOD.ERROR.1
CALL-NEXT-METHOD.ERROR.2
DEFMETHOD.ERROR.14
DEFMETHOD.ERROR.15
UPGRADED-ARRAY-ELEMENT-TYPE.8
MAKE-RANDOM-STATE.ERROR.4
MAP.ERROR.11
SUBTYPEP-COMPLEX.8
COMPILE-FILE.6A
COMPILE-FILE.18

View file

@ -109,3 +109,36 @@
(format t "~%Known fails: ~%~{~a~%~}~%"
'(SEM-SIGNAL-N-PROCESSES
SEM-SIGNAL-ONLY-N-PROCESSES))))
;;;
;;; RUNNING ANSI-TEST
;;;
(defun run-ansi-test (&optional (suite (ext:getenv "ANSI_TEST_SUITE")))
(ext:setenv "TEST_IMAGE" *test-image*)
(zerop
(nth-value
1
(ext:run-program
*test-image*
`("-norc"
"-eval" "(print (ext:getenv \"ECLDIR\"))"
"-eval" "(ext:install-bytecodes-compiler)"
"-eval" ,(if (ext:getenv "BYTECMP")
"t"
"(ignore-errors (ext:install-c-compiler))")
,@(cond (suite
`("-eval" ,(format nil "(setf *default-pathname-defaults* ~s)"
(truename #P"ansi-test/"))
"-load" "gclload1.lsp"
"-load" ,(namestring (make-pathname
:directory (list :relative suite)
:name "load"
:type "lsp"))))
(t
`("-load" "ansi-test/init.lsp")))
"-eval" ,(format nil "(rt:do-tests :exit t :expected-failures ~s)"
(merge-pathnames #P"tests/ansi-test-expected-failures.sexp"
*ecl-sources*)))
:input nil
:output t
:error :output))))