X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fswap-lispobjs.impure.lisp;h=8e8c1ca7d4c7d218a421af37f0464088a6cd1a2e;hb=a2d206014a62e159ffda2529ac379c2e28bc281c;hp=c3cf6f5d8bd31f707e51995be902d2b698eb9c12;hpb=4d633465231c79adeb3e4e59bf30c011d1d0e9dd;p=sbcl.git diff --git a/tests/swap-lispobjs.impure.lisp b/tests/swap-lispobjs.impure.lisp index c3cf6f5..8e8c1ca 100644 --- a/tests/swap-lispobjs.impure.lisp +++ b/tests/swap-lispobjs.impure.lisp @@ -14,14 +14,13 @@ (use-package :sb-alien) #-(or x86 x86-64) -(sb-ext:quit :unix-status 104) +(sb-ext:exit :code 104) (defun run (program &rest arguments) (let* ((proc nil) (output (with-output-to-string (s) (setf proc (run-program program arguments - :search (not (eql #\. (char program 0))) :output s))))) (unless (zerop (process-exit-code proc)) (error "Bad exit code: ~S~%Output:~% ~S" @@ -29,24 +28,23 @@ output)) output)) -(run "cc" "-O3" - "-I" "../src/runtime/" - "swap-lispobjs.c" - #+(and (or linux freebsd) (or x86-64 ppc mips)) "-fPIC" - #+(and x86-64 darwin) "-arch" #+(and x86-64 darwin) "x86_64" - #+darwin "-bundle" #-darwin "-shared" - "-o" "swap-lispobjs.so") +(with-test (:name :swap-lispobjs/prepare :broken-on :win32) + (run "/bin/sh" "run-compiler.sh" + "-sbcl-pic" "-sbcl-shared" + "-O3" "-I" "../src/runtime/" + "swap-lispobjs.c" "-o" "swap-lispobjs.so") -(load-shared-object (truename "swap-lispobjs.so")) + (load-shared-object (truename "swap-lispobjs.so")) -(define-alien-routine try-to-zero-with-swap-lispobjs int - (lispobj-adress unsigned-long)) + (define-alien-routine try-to-zero-with-swap-lispobjs int + (lispobj-adress unsigned-long))) -(with-test (:name :swap-lispobjs) +(with-test (:name :swap-lispobjs :fails-on :win32) (let ((x (cons 13 27))) (try-to-zero-with-swap-lispobjs (logandc2 (sb-kernel:get-lisp-obj-address x) sb-vm:lowtag-mask)) (assert (equal x (cons 0 27))))) -(delete-file "swap-lispobjs.so") +(when (probe-file "swap-lispobjs.so") + (delete-file "swap-lispobjs.so"))