From: Daniel Kochmański Date: Wed, 2 Sep 2015 08:36:27 +0000 (+0200) Subject: tests: fix remaing things X-Git-Url: http://git.pulsar-zone.net/?a=commitdiff_plain;h=6b0ccedf0872dd25fbfa07818c1fe3b6c51e2379;p=ecl.git tests: fix remaing things Signed-off-by: Daniel Kochmański --- diff --git a/src/tests/Makefile.in b/src/tests/Makefile.in index 2433f8a..922251c 100755 --- a/src/tests/Makefile.in +++ b/src/tests/Makefile.in @@ -13,7 +13,7 @@ do-regressions: regressions config.lsp $(ECL) -norc -load config.lsp -eval '(ecl-tests::run-regressions-tests)' -eval '(ext:quit)' 2>&1 | tee regressions.log show-fails: regressions.log - tail -n 8 regressions.log | head -n 6 + tail -n 16 regressions.log # # Create directories diff --git a/src/tests/bugs/doit.lsp b/src/tests/bugs/doit.lsp index 1f191c6..c232d86 100644 --- a/src/tests/bugs/doit.lsp +++ b/src/tests/bugs/doit.lsp @@ -47,8 +47,10 @@ #+unicode (load "tests/external-formats.lsp") -;; (setf sb-rt::*expected-failures* -;; (nconc sb-rt::*expected-failures* -;; '(MOP-GF-ADD/REMOVE-DEPENDENT))) +(setf sb-rt::*expected-failures* + (nconc sb-rt::*expected-failures* + '(SEM-SIGNAL-N-PROCESSES + SEM-SIGNAL-ONLY-N-PROCESSES + SEM-INTERRUPTED-RESIGNALS))) (time (sb-rt:do-tests)) diff --git a/src/tests/bugs/tests/compiler.lsp b/src/tests/bugs/tests/compiler.lsp index 404cd48..abefdd2 100644 --- a/src/tests/bugs/tests/compiler.lsp +++ b/src/tests/bugs/tests/compiler.lsp @@ -1069,7 +1069,7 @@ (+ ,sample (,op x)))) always (loop for x from (- pi) below pi by 0.05 for xf = (float x sample) - for error = (- (funcall f xf) (+ 1 (funcall op xf)))o + for error = (- (funcall f xf) (+ 1 (funcall op xf))) always (< (abs error) epsilon))) collect type) nil) diff --git a/src/tests/bugs/tests/embedding.lsp b/src/tests/bugs/tests/embedding.lsp index 033bf8a..e770630 100644 --- a/src/tests/bugs/tests/embedding.lsp +++ b/src/tests/bugs/tests/embedding.lsp @@ -6,11 +6,12 @@ (in-package :cl-test) (defun test-C-program (c-code &key capture-output) + (ensure-directories-exist "tmp/") (with-open-file (s "tmp/aux.c" :direction :output :if-exists :supersede :if-does-not-exist :create) (princ c-code s)) (c::compiler-cc "tmp/aux.c" "tmp/aux.o") - (c::linker-cc "tmp/aux.exe" "tmp/aux.o") + (c::linker-cc "tmp/aux.exe" '("tmp/aux.o")) (case capture-output (nil (return-from test-C-program (zerop (si::system "tmp/aux.exe")))) @@ -41,9 +42,10 @@ ;;; ;;; Fixed: 03/2006 (juanjo) ;;; -(deftest emb-0001-shutdown - (let* ((skeleton " +(deftest embedding.0001.shutdown + (let* ((skeleton " #include +#include int main (int argc, char **argv) { cl_object x; cl_boot(argc, argv); @@ -51,9 +53,8 @@ int main (int argc, char **argv) { cl_shutdown(); exit(0); }") - (form '(push (lambda () (print :shutdown)) ext::*exit-hooks*)) - (c-code (format nil skeleton (format nil "~S" form))) - (data (test-C-program (print c-code) :capture-output t))) - data) - '(:shutdown)) - + (form '(push (lambda () (print :shutdown)) si::*exit-hooks*)) + (c-code (format nil skeleton (format nil "~S" form))) + (data (test-C-program (print c-code) :capture-output t))) + data) + (:shutdown)) diff --git a/src/tests/bugs/tests/foreign-interface.lsp b/src/tests/bugs/tests/foreign-interface.lsp index bac356a..994905a 100644 --- a/src/tests/bugs/tests/foreign-interface.lsp +++ b/src/tests/bugs/tests/foreign-interface.lsp @@ -19,7 +19,7 @@ ;;; Header should be included as ;;; -(deftest ffi-001-callback +(deftest foreign-interface.0001.callback (and (zerop (si::system "rm -rf tmp; mkdir tmp")) (with-open-file (s "tmp/a.lsp" :direction :output @@ -45,7 +45,7 @@ ;;; Description: ;;; Callback examples based on the C compiler ;;; -(deftest ffi-002-callback +(deftest foreign-interface.0002.callback (and (zerop (si::system "rm -rf tmp; mkdir tmp")) (with-open-file (s "tmp/c.lsp" :direction :output @@ -74,8 +74,8 @@ int (*foo)(int) = #0; ;;; Callback examples based on the DFFI. Only work if this feature ;;; has been linked in. ;;; -#+(or) -(deftest ffi-002b-callback +#+dffi +(deftest foreign-interface.0003.callback (and (zerop (si::system "rm -rf tmp; mkdir tmp")) (with-open-file (s "tmp/c.lsp" :direction :output @@ -100,7 +100,7 @@ int (*foo)(int) = #0; ;;; Description: ;;; Regression test to ensure that two foreign data compare ;;; EQUAL when their addresses are the same. -(deftest ffi-003-foreign-data-equal +(deftest foreign-interface.0004.foreign-data-equal (equal (ffi:make-pointer 1234 :void) (ffi:make-pointer 1234 :int)) t) diff --git a/src/tests/bugs/tests/mixed.lsp b/src/tests/bugs/tests/mixed.lsp index cae921f..9907d16 100644 --- a/src/tests/bugs/tests/mixed.lsp +++ b/src/tests/bugs/tests/mixed.lsp @@ -31,6 +31,8 @@ (return :ok))))) nil) + + (declaim (ftype (function (cons) t) mixed.0003.foo)) (declaim (ftype (function (t cons) t) (setf mixed.0003.foo))) @@ -43,15 +45,15 @@ (defvar mixed.0003.*c* (cons 'x 'y)) (deftest mixed.0003.declaim-type.1 - (mixed.0003.foo mixed.0003.*c*) ;; correctly returns 'x - 'x) + (mixed.0003.foo mixed.0003.*c*) ;; correctly returns x + x) ;; signals an error: ;; Z is not of type CONS. ;; [Condition of type TYPE-ERROR] (deftest mixed.0004.declaim-type.2 (assert (eq 'z - (setf (foo *c*) 'z))) + (setf (mixed.0003.foo mixed.0003.*c*) 'z))) nil) (compile nil @@ -59,6 +61,8 @@ (1+ (the (values integer string) (funcall x))))) + + (deftest mixed.0005.style-warning-argument-order (let ((warning nil)) (assert