diff --git a/src/tests/Makefile.in b/src/tests/Makefile.in index 2b9ac315c..096898fed 100755 --- a/src/tests/Makefile.in +++ b/src/tests/Makefile.in @@ -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 diff --git a/src/tests/ansi-test-expected-failures.sexp b/src/tests/ansi-test-expected-failures.sexp new file mode 100644 index 000000000..e1de9ceaa --- /dev/null +++ b/src/tests/ansi-test-expected-failures.sexp @@ -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 diff --git a/src/tests/config.lsp.in b/src/tests/config.lsp.in index 6d5e91c51..236191d91 100755 --- a/src/tests/config.lsp.in +++ b/src/tests/config.lsp.in @@ -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))))