tests: fix remaing things
authorDaniel Kochmański <daniel@turtleware.eu>
Wed, 2 Sep 2015 08:36:27 +0000 (10:36 +0200)
committerDaniel Kochmański <daniel@turtleware.eu>
Wed, 2 Sep 2015 08:36:27 +0000 (10:36 +0200)
Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
src/tests/Makefile.in
src/tests/bugs/doit.lsp
src/tests/bugs/tests/compiler.lsp
src/tests/bugs/tests/embedding.lsp
src/tests/bugs/tests/foreign-interface.lsp
src/tests/bugs/tests/mixed.lsp

index 2433f8a..922251c 100755 (executable)
@@ -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
index 1f191c6..c232d86 100644 (file)
 #+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))
index 404cd48..abefdd2 100644 (file)
                                           (+ ,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)
index 033bf8a..e770630 100644 (file)
@@ -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"))))
 ;;;
 ;;; Fixed: 03/2006 (juanjo)
 ;;;
-(deftest emb-0001-shutdown
-  (let* ((skeleton "
+(deftest embedding.0001.shutdown
+    (let* ((skeleton "
 #include <ecl/ecl.h>
+#include <stdlib.h>
 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))
index bac356a..994905a 100644 (file)
@@ -19,7 +19,7 @@
 ;;;     Header <internal.h> should be included as <ecl/internal.h>
 ;;;
 
-(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)
index cae921f..9907d16 100644 (file)
@@ -31,6 +31,8 @@
               (return :ok)))))
   nil)
 
+\f
+
 (declaim (ftype (function (cons)   t)       mixed.0003.foo))
 (declaim (ftype (function (t cons) t) (setf mixed.0003.foo)))
 
 (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)))))
 
+\f
+
 (deftest mixed.0005.style-warning-argument-order
     (let ((warning nil))
       (assert