-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests are failing #8
Comments
I cannot reproduce this. What versions of ASDF and UIOP are you using ? |
How do I get UIOP's version number? |
The special variable |
Sorry, I'm still fairly new to Common Lisp. How do I retrieve this value? * uiop:uiop-version
debugger invoked on a SB-INT:SIMPLE-READER-PACKAGE-ERROR in thread
#<THREAD "main thread" RUNNING {10005585B3}>:
Symbol "UIOP-VERSION" not found in the UIOP/DRIVER package. |
Ha! :p OK, uiop version is "3.3.1". |
How are you invoking the test suite ? |
Sorry, I forgot to tell the full story. I'm trying to package this for Guix. Here is the Scheme code that runs the test suite: (define (test-system system asd-file test-asd-file)
"Use a lisp implementation to test SYSTEM using asdf. Load ASD-FILE first.
Also load TEST-ASD-FILE if necessary."
(lisp-eval-program
`((require :asdf)
(let ((*package* (find-package :asdf)))
(load ,asd-file)
,@(if test-asd-file
`((load ,test-asd-file))
;; Try some likely files.
(map (lambda (file)
`(when (uiop:file-exists-p ,file)
(load ,file)))
(list
(string-append system "-tests.asd")
(string-append system "-test.asd")
"tests.asd"
"test.asd"))))
(asdf:test-system ,system)))) |
@fare IIRC you use Guix ? The function above is wrong in so many ways. It should probably just set the search path and call TEST-SYSTEM, and ASDF will figure the rest. |
I currently use NixOS. Is Guix a viable alternative these days? |
There's no point in loading the |
Thanks for the feedback, I will let the author know about this. @fare: I've been using Guix for the past 6 months and it's been a "never look back" experience. I believe it's very mature already and 1.0 is looming at the horizon. |
@fare oops, I confused NixOS with Guix :) @Ambrevar the loading function is not guaranteed to work, especially using cl:load to evaluate a .asd file. The following should work: (define (test-system system asd-file test-asd-file)
"Use a lisp implementation to test SYSTEM using asdf."
(lisp-eval-program
`((require :asdf)
(flet ((add-path (file)
(let* ((dir (uiop:pathname-directory-pathname file))
(registry (uiop:find-symbol* "*CENTRAL-REGISTRY*" :asdf)))
(set registry (adjoin dir (symbol-value registry) :test 'equalp)))))
(mapc (function add-path) '(,asd-file ,test-asd-file))
(asdf:test-system ,system))))) |
Sorry for the delay. @sionescu: I've tried your suggestion, but now all tests fail with the following output: ...
starting phase `check'
Invoking sbcl: "/gnu/store/a26268cn6bcsgvi07v00pwab6r7p77jw-sbcl-1.4.4/bin/sbcl" "--non-interactive" "--eval" "(require :asdf)" "--eval" "(flet ((add-path (file) (let* ((dir (uiop:pathname-directory-pathname file)) (registry (uiop:find-symbol* \"*CENTRAL-REGISTRY*\" :asdf))) (set registry (adjoin dir (symbol-value registry) :test (quote equalp)))))) (mapc (function add-path) (quote (\"/gnu/store/7gzdq89ix4a1zg42v6vi75ajv8nzd3r4-sbcl-split-sequence-1.4.1/share/common-lisp/sbcl-source/split-sequence/split-sequence.asd\" #f))) (asdf:test-system \"split-sequence\"))"
This is SBCL 1.4.4, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
Unhandled SB-INT:SIMPLE-READER-ERROR in thread #<SB-THREAD:THREAD "main thread" RUNNING
{10005585B3}>:
no dispatch function defined for #\F
Line: 1, Column: 383, File-Position: 383
Stream: #<SB-IMPL::STRING-INPUT-STREAM {10030D37E3}>
Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {10005585B3}>
0: (SB-DEBUG::DEBUGGER-DISABLED-HOOK #<SB-INT:SIMPLE-READER-ERROR "no dispatch function defined for ~S" {10030D4753}> #<unused argument> :QUIT T)
1: (SB-DEBUG::RUN-HOOK *INVOKE-DEBUGGER-HOOK* #<SB-INT:SIMPLE-READER-ERROR "no dispatch function defined for ~S" {10030D4753}>)
2: (INVOKE-DEBUGGER #<SB-INT:SIMPLE-READER-ERROR "no dispatch function defined for ~S" {10030D4753}>)
3: (ERROR SB-INT:SIMPLE-READER-ERROR :STREAM #<SB-IMPL::STRING-INPUT-STREAM {10030D37E3}> :FORMAT-CONTROL "no dispatch function defined for ~S" :FORMAT-ARGUMENTS (#\F))
4: (SB-IMPL::READ-MAYBE-NOTHING #<SB-IMPL::STRING-INPUT-STREAM {10030D37E3}> #\#)
5: (SB-IMPL::READ-LIST #<SB-IMPL::STRING-INPUT-STREAM {10030D37E3}> #<unused argument>)
6: (SB-IMPL::READ-MAYBE-NOTHING #<SB-IMPL::STRING-INPUT-STREAM {10030D37E3}> #\()
7: (SB-IMPL::READ-LIST #<SB-IMPL::STRING-INPUT-STREAM {10030D37E3}> #<unused argument>)
8: (SB-IMPL::READ-MAYBE-NOTHING #<SB-IMPL::STRING-INPUT-STREAM {10030D37E3}> #\()
9: (SB-IMPL::READ-LIST #<SB-IMPL::STRING-INPUT-STREAM {10030D37E3}> #<unused argument>)
10: (SB-IMPL::READ-MAYBE-NOTHING #<SB-IMPL::STRING-INPUT-STREAM {10030D37E3}> #\()
11: (SB-IMPL::READ-LIST #<SB-IMPL::STRING-INPUT-STREAM {10030D37E3}> #<unused argument>)
12: (SB-IMPL::READ-MAYBE-NOTHING #<SB-IMPL::STRING-INPUT-STREAM {10030D37E3}> #\()
13: (SB-IMPL::%READ-PRESERVING-WHITESPACE #<SB-IMPL::STRING-INPUT-STREAM {10030D37E3}> T (NIL) T)
14: (SB-IMPL::%READ-PRESERVING-WHITESPACE #<SB-IMPL::STRING-INPUT-STREAM {10030D37E3}> T (NIL) NIL)
15: (READ #<SB-IMPL::STRING-INPUT-STREAM {10030D37E3}> T NIL NIL)
16: (SB-IMPL::%READ-FROM-STRING #<(SIMPLE-ARRAY CHARACTER (424)) (flet ((add-path (file) (let* ((dir (uiop:pathname-directory-pathname file)) (registry (uiop:find-symbol* "*CENTRAL-REGISTRY*" :asdf))) (set registry (adjoin dir (symbol-value registry) :test (quote e... {100197839F}> T NIL 0 NIL NIL)
17: (SB-IMPL::PROCESS-EVAL/LOAD-OPTIONS ((:EVAL . "(require :asdf)") (:EVAL . #<(SIMPLE-ARRAY CHARACTER (424)) (flet ((add-path (file) (let* ((dir (uiop:pathname-directory-pathname file)) (registry (uiop:find-symbol* "*CENTRAL-REGISTRY*" :asdf))) (set registry (adjoin dir (symbol-value registry) :test (quote e... {100197839F}>) (:QUIT)))
18: (SB-IMPL::TOPLEVEL-INIT)
19: ((FLET SB-UNIX::BODY :IN SAVE-LISP-AND-DIE))
20: ((FLET "WITHOUT-INTERRUPTS-BODY-27" :IN SAVE-LISP-AND-DIE))
21: ((LABELS SB-IMPL::RESTART-LISP :IN SAVE-LISP-AND-DIE)) In the meantime, Andy Patterson has updated the test function to the following, but it yields the same issue as I reported in the original post: (define (test-system system asd-file test-asd-file)
"Use a lisp implementation to test SYSTEM using asdf. Load ASD-FILE first.
Also load TEST-ASD-FILE if necessary."
(lisp-eval-program
`((require :asdf)
(asdf:load-asd (truename ,asd-file) :name ,(normalize-string system))
,@(if test-asd-file
`((asdf:load-asd (truename ,test-asd-file)))
;; Try some likely files.
(map (lambda (file)
`(when (uiop:file-exists-p ,file)
(asdf:load-asd (truename ,file))))
(list
(string-append system "-tests.asd")
(string-append system "-test.asd")
"tests.asd"
"test.asd")))
(asdf:test-system ,system)))) |
I'm closing this because I don't think it's an issue caused by split-sequence. |
Since we're on the topic of Nix and lisp tests: I've been working on my own copy of a CL-in-Nix builder, https://github.com/hraban/cl-nix-lite , and it handles spilt-sequence unit tests OK. It relies as much as possible on ASDFv3 conventions, doesn't modify any .asd files or create any convoluted lisp code, just issues Could be useful to anyone who wants to play around with Nix & CL :) |
The text was updated successfully, but these errors were encountered: