test-name: no refs location: /home/yoshi/guix/tests/gexp.scm:89 source: + (test-equal + "no refs" + '(display "hello!") + (let ((exp (gexp (display "hello!")))) + (and (gexp? exp) + (null? (gexp-inputs exp)) + (gexp->sexp* exp)))) expected-value: (display "hello!") actual-value: (display "hello!") result: PASS test-name: unquote location: /home/yoshi/guix/tests/gexp.scm:96 source: + (test-equal + "unquote" + '(display `(foo ,(+ 2 3))) + (let ((exp (gexp (display `(foo ,(+ 2 3)))))) + (and (gexp? exp) + (null? (gexp-inputs exp)) + (gexp->sexp* exp)))) expected-value: (display (quasiquote (foo (unquote (+ 2 3))))) actual-value: (display (quasiquote (foo (unquote (+ 2 3))))) result: PASS test-name: one input package location: /home/yoshi/guix/tests/gexp.scm:103 source: + (test-assert + "one input package" + (let ((exp (gexp (display (ungexp coreutils))))) + (and (gexp? exp) + (match (gexp-inputs exp) + (((p "out")) (eq? p coreutils))) + (equal? + `(display + ,(derivation->output-path + (package-derivation %store coreutils))) + (gexp->sexp* exp))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: one input package, dotted list location: /home/yoshi/guix/tests/gexp.scm:113 source: + (test-assert + "one input package, dotted list" + (let ((exp (gexp (coreutils ungexp coreutils)))) + (and (gexp? exp) + (match (gexp-inputs exp) + (((p "out")) (eq? p coreutils))) + (equal? + `(coreutils + unquote + (derivation->output-path + (package-derivation %store coreutils))) + (gexp->sexp* exp))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: one input origin location: /home/yoshi/guix/tests/gexp.scm:123 source: + (test-assert + "one input origin" + (let ((exp (gexp (display (ungexp (package-source coreutils)))))) + (and (gexp? exp) + (match (gexp-inputs exp) + (((o "out")) (eq? o (package-source coreutils)))) + (equal? + `(display + ,(derivation->output-path + (package-source-derivation + %store + (package-source coreutils)))) + (gexp->sexp* exp))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: one local file location: /home/yoshi/guix/tests/gexp.scm:134 source: + (test-assert + "one local file" + (let* ((file (search-path %load-path "guix.scm")) + (local (local-file file)) + (exp (gexp (display (ungexp local)))) + (intd (add-to-store + %store + (basename file) + #f + "sha256" + file))) + (and (gexp? exp) + (match (gexp-inputs exp) + (((x "out")) (eq? x local))) + (equal? `(display ,intd) (gexp->sexp* exp))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: one local file, symlink location: /home/yoshi/guix/tests/gexp.scm:146 source: + (test-assert + "one local file, symlink" + (let ((file (search-path %load-path "guix.scm")) + (link (tmpnam))) + (dynamic-wind + (const #t) + (lambda () + (symlink (canonicalize-path file) link) + (let* ((local (local-file link "my-file" #:recursive? #f)) + (exp (gexp (display (ungexp local)))) + (intd (add-to-store %store "my-file" #f "sha256" file))) + (and (gexp? exp) + (match (gexp-inputs exp) + (((x "out")) (eq? x local))) + (equal? `(display ,intd) (gexp->sexp* exp))))) + (lambda () + (false-if-exception (delete-file link)))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: local-file, relative file name location: /home/yoshi/guix/tests/gexp.scm:165 source: + (test-equal + "local-file, relative file name" + (canonicalize-path + (search-path %load-path "guix/base32.scm")) + (let ((directory + (dirname + (search-path + %load-path + "guix/build-system/gnu.scm")))) + (with-directory-excursion + directory + (let ((file (local-file "../guix/base32.scm"))) + (local-file-absolute-file-name file))))) expected-value: "/home/yoshi/guix/guix/base32.scm" actual-value: "/home/yoshi/guix/guix/base32.scm" result: PASS test-name: local-file, #:select? location: /home/yoshi/guix/tests/gexp.scm:173 source: + (test-assert + "local-file, #:select?" + (let ((store (open-connection-for-tests))) + (dynamic-wind + (const #t) + (lambda () + (run-with-store + store + (mlet* %store-monad + ((select? + -> + (lambda (file stat) + (member + (basename file) + '("guix.scm" "tests" "gexp.scm")))) + (file -> + (local-file + ".." + "directory" + #:recursive? + #t + #:select? + select?)) + (dir (lower-object file))) + (return + (and (store-path? dir) + (equal? + (scandir dir) + '("." ".." "guix.scm" "tests")) + (equal? + (scandir (string-append dir "/tests")) + '("." ".." "gexp.scm"))))) + #:guile-for-build + (%guile-for-build))) + (lambda () (close-connection store))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: one plain file location: /home/yoshi/guix/tests/gexp.scm:188 source: + (test-assert + "one plain file" + (let* ((file (plain-file "hi" "Hello, world!")) + (exp (gexp (display (ungexp file)))) + (expected + (add-text-to-store %store "hi" "Hello, world!"))) + (and (gexp? exp) + (match (gexp-inputs exp) + (((x "out")) (eq? x file))) + (equal? `(display ,expected) (gexp->sexp* exp))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: same input twice location: /home/yoshi/guix/tests/gexp.scm:198 source: + (test-assert + "same input twice" + (let ((exp (gexp (begin + (display (ungexp coreutils)) + (display (ungexp coreutils)))))) + (and (gexp? exp) + (match (gexp-inputs exp) + (((p "out")) (eq? p coreutils))) + (let ((e `(display + ,(derivation->output-path + (package-derivation %store coreutils))))) + (equal? `(begin ,e ,e) (gexp->sexp* exp)))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: two input packages, one derivation, one file location: /home/yoshi/guix/tests/gexp.scm:210 source: + (test-assert + "two input packages, one derivation, one file" + (let* ((drv (build-expression->derivation + %store + "foo" + 'bar + #:guile-for-build + (package-derivation %store %bootstrap-guile))) + (txt (add-text-to-store %store "foo" "Hello, world!")) + (exp (gexp (begin + (display (ungexp coreutils)) + (display (ungexp %bootstrap-guile)) + (display (ungexp drv)) + (display (ungexp txt)))))) + (define (match-input thing) + (match-lambda + ((drv-or-pkg _ ...) (eq? thing drv-or-pkg)))) + (and (gexp? exp) + (= 4 (length (gexp-inputs exp))) + (every (lambda (input) + (find (match-input input) (gexp-inputs exp))) + (list drv coreutils %bootstrap-guile txt)) + (let ((e0 `(display + ,(derivation->output-path + (package-derivation %store coreutils)))) + (e1 `(display + ,(derivation->output-path + (package-derivation %store %bootstrap-guile)))) + (e2 `(display ,(derivation->output-path drv))) + (e3 `(display ,txt))) + (equal? + `(begin ,e0 ,e1 ,e2 ,e3) + (gexp->sexp* exp)))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: file-append location: /home/yoshi/guix/tests/gexp.scm:238 source: + (test-assert + "file-append" + (let* ((drv (package-derivation %store %bootstrap-guile)) + (fa (file-append %bootstrap-guile "/bin/guile")) + (exp (gexp (here we go (ungexp fa))))) + (and (match (gexp->sexp* exp) + (('here 'we 'go (? string? result)) + (string=? + result + (string-append + (derivation->output-path drv) + "/bin/guile")))) + (match (gexp-inputs exp) + (((thing "out")) (eq? thing fa)))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: file-append, output location: /home/yoshi/guix/tests/gexp.scm:251 source: + (test-assert + "file-append, output" + (let* ((drv (package-derivation %store glibc)) + (fa (file-append glibc "/lib" "/debug")) + (exp (gexp (foo (ungexp fa "debug"))))) + (and (match (gexp->sexp* exp) + (('foo (? string? result)) + (string=? + result + (string-append + (derivation->output-path drv "debug") + "/lib/debug")))) + (match (gexp-inputs exp) + (((thing "debug")) (eq? thing fa)))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: file-append, nested location: /home/yoshi/guix/tests/gexp.scm:264 source: + (test-assert + "file-append, nested" + (let* ((drv (package-derivation %store glibc)) + (dir (file-append glibc "/bin")) + (slash (file-append dir "/")) + (file (file-append slash "getent")) + (exp (gexp (foo (ungexp file))))) + (and (match (gexp->sexp* exp) + (('foo (? string? result)) + (string=? + result + (string-append + (derivation->output-path drv) + "/bin/getent")))) + (match (gexp-inputs exp) + (((thing "out")) (eq? thing file)))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: ungexp + ungexp-native location: /home/yoshi/guix/tests/gexp.scm:279 source: + (test-assert + "ungexp + ungexp-native" + (let* ((exp (gexp (list (ungexp-native %bootstrap-guile) + (ungexp coreutils) + (ungexp-native glibc) + (ungexp binutils)))) + (target "mips64el-linux") + (guile (derivation->output-path + (package-derivation %store %bootstrap-guile))) + (cu (derivation->output-path + (package-cross-derivation + %store + coreutils + target))) + (libc (derivation->output-path + (package-derivation %store glibc))) + (bu (derivation->output-path + (package-cross-derivation %store binutils target)))) + (and (lset= equal? + `((,%bootstrap-guile "out") (,glibc "out")) + (gexp-native-inputs exp)) + (lset= equal? + `((,coreutils "out") (,binutils "out")) + (gexp-inputs exp)) + (equal? + `(list ,guile ,cu ,libc ,bu) + (gexp->sexp* exp target))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: ungexp + ungexp-native, nested location: /home/yoshi/guix/tests/gexp.scm:302 source: + (test-equal + "ungexp + ungexp-native, nested" + (list `((,%bootstrap-guile "out")) + '<> + `((,coreutils "out"))) + (let* ((exp (gexp (list (ungexp-native (gexp (ungexp coreutils))) + (ungexp %bootstrap-guile))))) + (list (gexp-inputs exp) + '<> + (gexp-native-inputs exp)))) expected-value: (((# "out")) <> ((# "out"))) actual-value: (((# "out")) <> ((# "out"))) result: PASS test-name: ungexp + ungexp-native, nested, special mixture location: /home/yoshi/guix/tests/gexp.scm:308 source: + (test-equal + "ungexp + ungexp-native, nested, special mixture" + `(() <> ((,coreutils "out"))) + (let* ((foo (gexp (foo (ungexp-native coreutils)))) + (exp (gexp (bar (ungexp foo))))) + (list (gexp-inputs exp) + '<> + (gexp-native-inputs exp)))) expected-value: (() <> ((# "out"))) actual-value: (() <> ((# "out"))) result: PASS test-name: input list location: /home/yoshi/guix/tests/gexp.scm:316 source: + (test-assert + "input list" + (let ((exp (gexp (display + '(ungexp (list %bootstrap-guile coreutils))))) + (guile (derivation->output-path + (package-derivation %store %bootstrap-guile))) + (cu (derivation->output-path + (package-derivation %store coreutils)))) + (and (lset= equal? + `((,%bootstrap-guile "out") (,coreutils "out")) + (gexp-inputs exp)) + (equal? + `(display '(,guile ,cu)) + (gexp->sexp* exp))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: input list + ungexp-native location: /home/yoshi/guix/tests/gexp.scm:329 source: + (test-assert + "input list + ungexp-native" + (let* ((target "mips64el-linux") + (exp (gexp (display + (cons '(ungexp-native + (list %bootstrap-guile coreutils)) + '(ungexp (list glibc binutils)))))) + (guile (derivation->output-path + (package-derivation %store %bootstrap-guile))) + (cu (derivation->output-path + (package-derivation %store coreutils))) + (xlibc (derivation->output-path + (package-cross-derivation %store glibc target))) + (xbu (derivation->output-path + (package-cross-derivation %store binutils target)))) + (and (lset= equal? + `((,%bootstrap-guile "out") (,coreutils "out")) + (gexp-native-inputs exp)) + (lset= equal? + `((,glibc "out") (,binutils "out")) + (gexp-inputs exp)) + (equal? + `(display (cons '(,guile ,cu) '(,xlibc ,xbu))) + (gexp->sexp* exp target))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: input list splicing location: /home/yoshi/guix/tests/gexp.scm:351 source: + (test-assert + "input list splicing" + (let* ((inputs + (list (gexp-input glibc "debug") + %bootstrap-guile)) + (outputs + (list (derivation->output-path + (package-derivation %store glibc) + "debug") + (derivation->output-path + (package-derivation %store %bootstrap-guile)))) + (exp (gexp (list (ungexp-splicing (cons (+ 2 3) inputs)))))) + (and (lset= equal? + `((,glibc "debug") (,%bootstrap-guile "out")) + (gexp-inputs exp)) + (equal? + (gexp->sexp* exp) + `(list ,@(cons 5 outputs)))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: input list splicing + ungexp-native-splicing location: /home/yoshi/guix/tests/gexp.scm:365 source: + (test-assert + "input list splicing + ungexp-native-splicing" + (let* ((inputs + (list (gexp-input glibc "debug" #:native? #t) + %bootstrap-guile)) + (exp (gexp (list (ungexp-native-splicing (cons (+ 2 3) inputs)))))) + (and (lset= equal? + `((,glibc "debug") (,%bootstrap-guile "out")) + (gexp-native-inputs exp)) + (null? (gexp-inputs exp)) + (equal? + (gexp->sexp* exp) + (gexp->sexp* exp "mips64el-linux"))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: gexp list splicing + ungexp-splicing location: /home/yoshi/guix/tests/gexp.scm:376 source: + (test-assert + "gexp list splicing + ungexp-splicing" + (let* ((inner (gexp (ungexp-native glibc))) + (exp (gexp (list (ungexp-splicing (list inner)))))) + (and (equal? + `((,glibc "out")) + (gexp-native-inputs exp)) + (null? (gexp-inputs exp)) + (equal? + (gexp->sexp* exp) + (gexp->sexp* exp "mips64el-linux"))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: output list location: /home/yoshi/guix/tests/gexp.scm:384 source: + (test-equal + "output list" + 2 + (let ((exp (gexp (begin + (mkdir (ungexp output)) + (mkdir (ungexp output "bar")))))) + (length (gexp-outputs exp)))) expected-value: 2 actual-value: 2 result: PASS test-name: output list, combined gexps location: /home/yoshi/guix/tests/gexp.scm:390 source: + (test-assert + "output list, combined gexps" + (let* ((exp0 (gexp (mkdir (ungexp output)))) + (exp1 (gexp (mkdir (ungexp output "foo")))) + (exp2 (gexp (begin + (display "hi!") + (ungexp exp0) + (ungexp exp1))))) + (and (lset= equal? + (append (gexp-outputs exp0) (gexp-outputs exp1)) + (gexp-outputs exp2)) + (= 2 (length (gexp-outputs exp2)))))) actual-value: #t result: PASS test-name: output list, combined gexps, duplicate output location: /home/yoshi/guix/tests/gexp.scm:399 source: + (test-equal + "output list, combined gexps, duplicate output" + 1 + (let* ((exp0 (gexp (mkdir (ungexp output)))) + (exp1 (gexp (begin (mkdir (ungexp output)) (ungexp exp0)))) + (exp2 (gexp (begin (mkdir (ungexp output)) (ungexp exp1))))) + (length (gexp-outputs exp2)))) expected-value: 1 actual-value: 1 result: PASS test-name: output list + ungexp-splicing list, combined gexps location: /home/yoshi/guix/tests/gexp.scm:406 source: + (test-assert + "output list + ungexp-splicing list, combined gexps" + (let* ((exp0 (gexp (mkdir (ungexp output)))) + (exp1 (gexp (mkdir (ungexp output "foo")))) + (exp2 (gexp (begin + (display "hi!") + (ungexp-splicing (list exp0 exp1)))))) + (and (lset= equal? + (append (gexp-outputs exp0) (gexp-outputs exp1)) + (gexp-outputs exp2)) + (= 2 (length (gexp-outputs exp2)))))) actual-value: #t result: PASS test-name: gexp->file location: /home/yoshi/guix/tests/gexp.scm:416 source: + (test-assert + "gexp->file" + (let ((store (open-connection-for-tests))) + (dynamic-wind + (const #t) + (lambda () + (run-with-store + store + (mlet* %store-monad + ((exp -> + (gexp (display (ungexp %bootstrap-guile)))) + (guile (package-file %bootstrap-guile)) + (sexp (gexp->sexp exp)) + (drv (gexp->file "foo" exp)) + (out -> (derivation->output-path drv)) + (done (built-derivations (list drv))) + (refs (references* out))) + (return + (and (equal? sexp (call-with-input-file out read)) + (equal? (list guile) refs)))) + #:guile-for-build + (%guile-for-build))) + (lambda () (close-connection store))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: gexp->file + file-append location: /home/yoshi/guix/tests/gexp.scm:427 source: + (test-assert + "gexp->file + file-append" + (let ((store (open-connection-for-tests))) + (dynamic-wind + (const #t) + (lambda () + (run-with-store + store + (mlet* %store-monad + ((exp -> + (gexp (ungexp + (file-append %bootstrap-guile "/bin/guile")))) + (guile (package-file %bootstrap-guile)) + (drv (gexp->file "foo" exp)) + (out -> (derivation->output-path drv)) + (done (built-derivations (list drv))) + (refs (references* out))) + (return + (and (equal? + (string-append guile "/bin/guile") + (call-with-input-file out read)) + (equal? (list guile) refs)))) + #:guile-for-build + (%guile-for-build))) + (lambda () (close-connection store))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: gexp->file + #:splice? location: /home/yoshi/guix/tests/gexp.scm:439 source: + (test-assert + "gexp->file + #:splice?" + (let ((store (open-connection-for-tests))) + (dynamic-wind + (const #t) + (lambda () + (run-with-store + store + (mlet* %store-monad + ((exp -> + (list (gexp (define foo 'bar)) + (gexp (define guile + (ungexp %bootstrap-guile))))) + (guile (package-file %bootstrap-guile)) + (drv (gexp->file "splice" exp #:splice? #t)) + (out -> (derivation->output-path drv)) + (done (built-derivations (list drv))) + (refs (references* out))) + (pk 'splice out) + (return + (and (equal? + `((define foo 'bar) + (define guile ,guile) + ,(call-with-input-string "" read)) + (call-with-input-file + out + (lambda (port) + (list (read port) (read port) (read port))))) + (equal? (list guile) refs)))) + #:guile-for-build + (%guile-for-build))) + (lambda () (close-connection store))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: gexp->derivation location: /home/yoshi/guix/tests/gexp.scm:457 source: + (test-assert + "gexp->derivation" + (let ((store (open-connection-for-tests))) + (dynamic-wind + (const #t) + (lambda () + (run-with-store + store + (mlet* %store-monad + ((file (text-file "foo" "Hello, world!")) + (exp -> + (gexp (begin + (mkdir (ungexp output)) + (chdir (ungexp output)) + (symlink + (string-append + (ungexp %bootstrap-guile) + "/bin/guile") + "foo") + (symlink + (ungexp file) + (ungexp output "2nd"))))) + (drv (gexp->derivation "foo" exp)) + (out -> (derivation->output-path drv)) + (out2 -> (derivation->output-path drv "2nd")) + (done (built-derivations (list drv))) + (refs (references* out)) + (refs2 (references* out2)) + (guile (package-file %bootstrap-guile "bin/guile"))) + (return + (and (string=? + (readlink (string-append out "/foo")) + guile) + (string=? (readlink out2) file) + (equal? refs (list (dirname (dirname guile)))) + (equal? refs2 (list file)) + (null? (derivation-properties drv))))) + #:guile-for-build + (%guile-for-build))) + (lambda () (close-connection store))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: gexp->derivation properties location: /home/yoshi/guix/tests/gexp.scm:482 source: + (test-assert + "gexp->derivation properties" + (let ((store (open-connection-for-tests))) + (dynamic-wind + (const #t) + (lambda () + (run-with-store + store + (mlet %store-monad + ((drv (gexp->derivation + "foo" + (gexp (mkdir (ungexp output))) + #:properties + '((type . test))))) + (return + (equal? + '((type . test)) + (derivation-properties drv)))) + #:guile-for-build + (%guile-for-build))) + (lambda () (close-connection store))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: gexp->derivation vs. grafts location: /home/yoshi/guix/tests/gexp.scm:489 source: + (test-assert + "gexp->derivation vs. grafts" + (let ((store (open-connection-for-tests))) + (dynamic-wind + (const #t) + (lambda () + (run-with-store + store + (mlet* %store-monad + ((graft? (set-grafting #f)) + (p0 -> + (dummy-package + "dummy" + (arguments '(#:implicit-inputs? #f)))) + (r -> (package (inherit p0) (name "DuMMY"))) + (p1 -> (package (inherit p0) (replacement r))) + (exp0 -> + (gexp (frob (ungexp p0) (ungexp output)))) + (exp1 -> + (gexp (frob (ungexp p1) (ungexp output)))) + (void (set-guile-for-build %bootstrap-guile)) + (drv0 (gexp->derivation "t" exp0 #:graft? #t)) + (drv1 (gexp->derivation "t" exp1 #:graft? #t)) + (drv1* (gexp->derivation "t" exp1 #:graft? #f)) + (_ (set-grafting graft?))) + (return + (and (not (string=? + (derivation->output-path drv0) + (derivation->output-path drv1))) + (string=? + (derivation->output-path drv0) + (derivation->output-path drv1*))))) + #:guile-for-build + (%guile-for-build))) + (lambda () (close-connection store))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: gexp->derivation, composed gexps location: /home/yoshi/guix/tests/gexp.scm:508 source: + (test-assert + "gexp->derivation, composed gexps" + (let ((store (open-connection-for-tests))) + (dynamic-wind + (const #t) + (lambda () + (run-with-store + store + (mlet* %store-monad + ((exp0 -> + (gexp (begin + (mkdir (ungexp output)) + (chdir (ungexp output))))) + (exp1 -> + (gexp (symlink + (string-append + (ungexp %bootstrap-guile) + "/bin/guile") + "foo"))) + (exp -> + (gexp (begin (ungexp exp0) (ungexp exp1)))) + (drv (gexp->derivation "foo" exp)) + (out -> (derivation->output-path drv)) + (done (built-derivations (list drv))) + (guile (package-file %bootstrap-guile "bin/guile"))) + (return + (string=? + (readlink (string-append out "/foo")) + guile))) + #:guile-for-build + (%guile-for-build))) + (lambda () (close-connection store))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: gexp->derivation, default system location: /home/yoshi/guix/tests/gexp.scm:524 source: + (test-assert + "gexp->derivation, default system" + (let ((store (open-connection-for-tests))) + (dynamic-wind + (const #t) + (lambda () + (run-with-store + store + (let ((system (%current-system)) + (mdrv (parameterize + ((%current-system "foobar64-linux")) + (gexp->derivation + "foo" + (gexp (mkdir (ungexp output))))))) + (mlet %store-monad + ((drv mdrv)) + (return + (string=? system (derivation-system drv))))) + #:guile-for-build + (%guile-for-build))) + (lambda () (close-connection store))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: gexp->derivation, local-file location: /home/yoshi/guix/tests/gexp.scm:535 source: + (test-assert + "gexp->derivation, local-file" + (let ((store (open-connection-for-tests))) + (dynamic-wind + (const #t) + (lambda () + (run-with-store + store + (mlet* %store-monad + ((file -> (search-path %load-path "guix.scm")) + (intd (interned-file file #:recursive? #f)) + (local -> (local-file file)) + (exp -> + (gexp (begin + (stat (ungexp local)) + (symlink (ungexp local) (ungexp output))))) + (drv (gexp->derivation "local-file" exp))) + (mbegin + %store-monad + (built-derivations (list drv)) + (return + (string=? + (readlink (derivation->output-path drv)) + intd)))) + #:guile-for-build + (%guile-for-build))) + (lambda () (close-connection store))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: gexp->derivation, cross-compilation location: /home/yoshi/guix/tests/gexp.scm:549 source: + (test-assert + "gexp->derivation, cross-compilation" + (let ((store (open-connection-for-tests))) + (dynamic-wind + (const #t) + (lambda () + (run-with-store + store + (mlet* %store-monad + ((target -> "mips64el-linux") + (exp -> + (gexp (list (ungexp coreutils) (ungexp output)))) + (xdrv (gexp->derivation "foo" exp #:target target)) + (refs (references* (derivation-file-name xdrv))) + (xcu (package->cross-derivation coreutils target)) + (cu (package->derivation coreutils))) + (return + (and (member (derivation-file-name xcu) refs) + (not (member (derivation-file-name cu) refs))))) + #:guile-for-build + (%guile-for-build))) + (lambda () (close-connection store))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: gexp->derivation, ungexp-native location: /home/yoshi/guix/tests/gexp.scm:563 source: + (test-assert + "gexp->derivation, ungexp-native" + (let ((store (open-connection-for-tests))) + (dynamic-wind + (const #t) + (lambda () + (run-with-store + store + (mlet* %store-monad + ((target -> "mips64el-linux") + (exp -> + (gexp (list (ungexp-native coreutils) + (ungexp output)))) + (xdrv (gexp->derivation "foo" exp #:target target)) + (drv (gexp->derivation "foo" exp))) + (return + (string=? + (derivation-file-name drv) + (derivation-file-name xdrv)))) + #:guile-for-build + (%guile-for-build))) + (lambda () (close-connection store))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: gexp->derivation, ungexp + ungexp-native location: /home/yoshi/guix/tests/gexp.scm:573 source: + (test-assert + "gexp->derivation, ungexp + ungexp-native" + (let ((store (open-connection-for-tests))) + (dynamic-wind + (const #t) + (lambda () + (run-with-store + store + (mlet* %store-monad + ((target -> "mips64el-linux") + (exp -> + (gexp (list (ungexp-native coreutils) + (ungexp glibc) + (ungexp output)))) + (xdrv (gexp->derivation "foo" exp #:target target)) + (refs (references* (derivation-file-name xdrv))) + (xglibc (package->cross-derivation glibc target)) + (cu (package->derivation coreutils))) + (return + (and (member (derivation-file-name cu) refs) + (member (derivation-file-name xglibc) refs)))) + #:guile-for-build + (%guile-for-build))) + (lambda () (close-connection store))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: gexp->derivation, ungexp-native + composed gexps location: /home/yoshi/guix/tests/gexp.scm:587 source: + (test-assert + "gexp->derivation, ungexp-native + composed gexps" + (let ((store (open-connection-for-tests))) + (dynamic-wind + (const #t) + (lambda () + (run-with-store + store + (mlet* %store-monad + ((target -> "mips64el-linux") + (exp0 -> (gexp (list 1 2 (ungexp coreutils)))) + (exp -> (gexp (list 0 (ungexp-native exp0)))) + (xdrv (gexp->derivation "foo" exp #:target target)) + (drv (gexp->derivation "foo" exp))) + (return + (string=? + (derivation-file-name drv) + (derivation-file-name xdrv)))) + #:guile-for-build + (%guile-for-build))) + (lambda () (close-connection store))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: gexp->derivation, store copy location: /home/yoshi/guix/tests/gexp.scm:598 source: + (test-assert + "gexp->derivation, store copy" + (let ((store (open-connection-for-tests))) + (dynamic-wind + (const #t) + (lambda () + (run-with-store + store + (let ((build-one + (gexp (call-with-output-file + (ungexp output) + (lambda (port) + (display "This is the one." port))))) + (build-two + (lambda (one) + (gexp (begin + (mkdir (ungexp output)) + (symlink + (ungexp one) + (string-append (ungexp output) "/one")) + (call-with-output-file + (string-append (ungexp output) "/two") + (lambda (port) + (display + "This is the second one." + port))))))) + (build-drv + (gexp (begin + (use-modules (guix build store-copy)) + (mkdir (ungexp output)) + (populate-store '("graph") (ungexp output)))))) + (mlet* %store-monad + ((one (gexp->derivation "one" build-one)) + (two (gexp->derivation "two" (build-two one))) + (drv (gexp->derivation + "store-copy" + build-drv + #:references-graphs + `(("graph" ,two)) + #:modules + '((guix build store-copy) + (guix progress) + (guix records) + (guix sets) + (guix build utils)))) + (ok? (built-derivations (list drv))) + (out -> (derivation->output-path drv))) + (let ((one (derivation->output-path one)) + (two (derivation->output-path two))) + (return + (and ok? + (file-exists? (string-append out "/" one)) + (file-exists? (string-append out "/" two)) + (file-exists? (string-append out "/" two "/two")) + (string=? + (readlink (string-append out "/" two "/one")) + one)))))) + #:guile-for-build + (%guile-for-build))) + (lambda () (close-connection store))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: imported-files location: /home/yoshi/guix/tests/gexp.scm:636 source: + (test-assert + "imported-files" + (let ((store (open-connection-for-tests))) + (dynamic-wind + (const #t) + (lambda () + (run-with-store + store + (mlet* %store-monad + ((files -> + `(("x" + unquote + (search-path %load-path "ice-9/q.scm")) + ("a/b/c" + unquote + (search-path %load-path "guix/derivations.scm")) + ("p/q" + unquote + (search-path %load-path "guix.scm")) + ("p/z" + unquote + (search-path %load-path "guix/store.scm")))) + (dir (imported-files files))) + (mbegin + %store-monad + (return + (every (match-lambda + ((path . source) + (equal? + (call-with-input-file + (string-append dir "/" path) + get-bytevector-all) + (call-with-input-file + source + get-bytevector-all)))) + files)))) + #:guile-for-build + (%guile-for-build))) + (lambda () (close-connection store))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: imported-files with file-like objects location: /home/yoshi/guix/tests/gexp.scm:654 source: + (test-assert + "imported-files with file-like objects" + (let ((store (open-connection-for-tests))) + (dynamic-wind + (const #t) + (lambda () + (run-with-store + store + (mlet* %store-monad + ((plain -> (plain-file "foo" "bar!")) + (q-scm -> (search-path %load-path "ice-9/q.scm")) + (files -> + `(("a/b/c" unquote q-scm) ("p/q" unquote plain))) + (drv (imported-files files))) + (define (file=? file1 file2) + (= (stat:ino (stat file1)) + (stat:ino (stat file2)))) + (mbegin + %store-monad + (built-derivations (list (pk 'drv drv))) + (mlet %store-monad + ((dir -> (derivation->output-path drv)) + (plain* (text-file "foo" "bar!")) + (q-scm* (interned-file q-scm "c"))) + (return + (and (file=? (string-append dir "/a/b/c") q-scm*) + (file=? + (string-append dir "/p/q") + plain*)))))) + #:guile-for-build + (%guile-for-build))) + (lambda () (close-connection store))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: gexp-modules & ungexp location: /home/yoshi/guix/tests/gexp.scm:674 source: + (test-equal + "gexp-modules & ungexp" + '((bar) (foo)) + ((@@ (guix gexp) gexp-modules) + (gexp (foo (ungexp + (with-imported-modules '((foo)) (gexp +))) + (ungexp-native + (with-imported-modules '((bar)) (gexp -))))))) expected-value: ((bar) (foo)) actual-value: ((bar) (foo)) result: PASS test-name: gexp-modules & ungexp-splicing location: /home/yoshi/guix/tests/gexp.scm:680 source: + (test-equal + "gexp-modules & ungexp-splicing" + '((foo) (bar)) + ((@@ (guix gexp) gexp-modules) + (gexp (foo (ungexp-splicing + (list (with-imported-modules '((foo)) (gexp +)) + (with-imported-modules '((bar)) (gexp -)))))))) expected-value: ((foo) (bar)) actual-value: ((foo) (bar)) result: PASS test-name: gexp-modules deletes duplicates location: /home/yoshi/guix/tests/gexp.scm:686 source: + (test-assert + "gexp-modules deletes duplicates" + (let ((make-file + (lambda () + (eval '(scheme-file + "bar.scm" + (gexp (define-module (bar)))) + (current-module))))) + (define result + ((@@ (guix gexp) gexp-modules) + (with-imported-modules + `(((bar) => ,(make-file)) + ((bar) => ,(make-file)) + (foo) + (foo)) + (gexp +)))) + (match result + (((('bar) '=> (? scheme-file?)) ('foo)) #t)))) actual-value: #t result: PASS test-name: gexp-modules and literal Scheme object location: /home/yoshi/guix/tests/gexp.scm:702 source: + (test-equal + "gexp-modules and literal Scheme object" + '() + (gexp-modules #t)) expected-value: () actual-value: () result: PASS test-name: gexp->derivation #:modules location: /home/yoshi/guix/tests/gexp.scm:706 source: + (test-assert + "gexp->derivation #:modules" + (let ((store (open-connection-for-tests))) + (dynamic-wind + (const #t) + (lambda () + (run-with-store + store + (mlet* %store-monad + ((build -> + (gexp (begin + (use-modules (guix build utils)) + (mkdir-p + (string-append + (ungexp output) + "/guile/guix/nix")) + #t))) + (drv (gexp->derivation + "test-with-modules" + build + #:modules + '((guix build utils))))) + (mbegin + %store-monad + (built-derivations (list drv)) + (let* ((p (derivation->output-path drv)) + (s (stat (string-append p "/guile/guix/nix")))) + (return (eq? (stat:type s) 'directory))))) + #:guile-for-build + (%guile-for-build))) + (lambda () (close-connection store))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: gexp->derivation & with-imported-modules location: /home/yoshi/guix/tests/gexp.scm:720 source: + (test-assert + "gexp->derivation & with-imported-modules" + (let ((store (open-connection-for-tests))) + (dynamic-wind + (const #t) + (lambda () + (run-with-store + store + (mlet* %store-monad + ((build -> + (with-imported-modules + '((guix build utils)) + (gexp (begin + (use-modules (guix build utils)) + (mkdir-p + (string-append + (ungexp output) + "/guile/guix/nix")) + #t)))) + (drv (gexp->derivation "test-with-modules" build))) + (mbegin + %store-monad + (built-derivations (list drv)) + (let* ((p (derivation->output-path drv)) + (s (stat (string-append p "/guile/guix/nix")))) + (return (eq? (stat:type s) 'directory))))) + #:guile-for-build + (%guile-for-build))) + (lambda () (close-connection store))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: gexp->derivation & nested with-imported-modules location: /home/yoshi/guix/tests/gexp.scm:735 source: + (test-assert + "gexp->derivation & nested with-imported-modules" + (let ((store (open-connection-for-tests))) + (dynamic-wind + (const #t) + (lambda () + (run-with-store + store + (mlet* %store-monad + ((build1 + -> + (with-imported-modules + '((guix build utils)) + (gexp (begin + (use-modules (guix build utils)) + (mkdir-p + (string-append + (ungexp output) + "/guile/guix/nix")) + #t)))) + (build2 + -> + (with-imported-modules + '((guix build bournish)) + (gexp (begin + (use-modules + (guix build bournish) + (system base compile)) + (ungexp-native build1) + (call-with-output-file + (string-append (ungexp output) "/b") + (lambda (port) + (write (read-and-compile + (open-input-string "cd /foo") + #:from + %bournish-language + #:to + 'scheme) + port))))))) + (drv (gexp->derivation "test-with-modules" build2))) + (mbegin + %store-monad + (built-derivations (list drv)) + (let* ((p (derivation->output-path drv)) + (s (stat (string-append p "/guile/guix/nix"))) + (b (string-append p "/b"))) + (return + (and (eq? (stat:type s) 'directory) + (equal? + '(chdir "/foo") + (call-with-input-file b read))))))) + #:guile-for-build + (%guile-for-build))) + (lambda () (close-connection store))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: gexp->derivation & with-imported-module & computed module location: /home/yoshi/guix/tests/gexp.scm:764 source: + (test-assert + "gexp->derivation & with-imported-module & computed module" + (let ((store (open-connection-for-tests))) + (dynamic-wind + (const #t) + (lambda () + (run-with-store + store + (mlet* %store-monad + ((module + -> + (scheme-file + "x" + (gexp ((define-module (foo bar) #:export (the-answer)) + (define the-answer 42))) + #:splice? + #t)) + (build -> + (with-imported-modules + `(((foo bar) => ,module) (guix build utils)) + (gexp (begin + (use-modules (guix build utils) (foo bar)) + mkdir-p + (call-with-output-file + (ungexp output) + (lambda (port) + (write the-answer port))))))) + (drv (gexp->derivation "thing" build)) + (out -> (derivation->output-path drv))) + (mbegin + %store-monad + (built-derivations (list drv)) + (return (= 42 (call-with-input-file out read))))) + #:guile-for-build + (%guile-for-build))) + (lambda () (close-connection store))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: gexp-extensions & ungexp location: /home/yoshi/guix/tests/gexp.scm:787 source: + (test-equal + "gexp-extensions & ungexp" + (list sed grep) + ((@@ (guix gexp) gexp-extensions) + (gexp (foo (ungexp (with-extensions (list grep) (gexp +))) + (ungexp-native + (with-extensions (list sed) (gexp -))))))) expected-value: (# #) actual-value: (# #) result: PASS test-name: gexp-extensions & ungexp-splicing location: /home/yoshi/guix/tests/gexp.scm:793 source: + (test-equal + "gexp-extensions & ungexp-splicing" + (list grep sed) + ((@@ (guix gexp) gexp-extensions) + (gexp (foo (ungexp-splicing + (list (with-extensions (list grep) (gexp +)) + (with-imported-modules + '((foo)) + (with-extensions (list sed) (gexp -))))))))) expected-value: (# #) actual-value: (# #) result: PASS test-name: gexp-extensions and literal Scheme object location: /home/yoshi/guix/tests/gexp.scm:800 source: + (test-equal + "gexp-extensions and literal Scheme object" + '() + ((@@ (guix gexp) gexp-extensions) #t)) expected-value: () actual-value: () result: PASS test-name: gexp->derivation & with-extensions location: /home/yoshi/guix/tests/gexp.scm:804 source: + (test-assert + "gexp->derivation & with-extensions" + (let ((store (open-connection-for-tests))) + (dynamic-wind + (const #t) + (lambda () + (run-with-store + store + (mlet* %store-monad + ((extension -> %extension-package) + (module + -> + (scheme-file + "x" + (gexp ((define-module + (foo) + #:use-module + (hg2g) + #:export + (multiply)) + (define (multiply x) (* the-answer x)))) + #:splice? + #t)) + (build -> + (with-extensions + (list extension) + (with-imported-modules + `((guix build utils) ((foo) => ,module)) + (gexp (begin + (use-modules + (guix build utils) + (hg2g) + (foo)) + (call-with-output-file + (ungexp output) + (lambda (port) + (write (list the-answer + (multiply 2)) + port)))))))) + (drv (gexp->derivation + "thingie" + build + #:effective-version + "2.0")) + (out -> (derivation->output-path drv))) + (mbegin + %store-monad + (built-derivations (list drv)) + (return + (equal? '(42 84) (call-with-input-file out read))))) + #:guile-for-build + (%guile-for-build))) + (lambda () (close-connection store))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: gexp->derivation #:references-graphs location: /home/yoshi/guix/tests/gexp.scm:835 source: + (test-assert + "gexp->derivation #:references-graphs" + (let ((store (open-connection-for-tests))) + (dynamic-wind + (const #t) + (lambda () + (run-with-store + store + (mlet* %store-monad + ((one (text-file "one" (random-text))) + (two (gexp->derivation + "two" + (gexp (symlink + (ungexp one) + (ungexp output "chbouib"))))) + (build -> + (with-imported-modules + '((guix build store-copy) + (guix progress) + (guix records) + (guix sets) + (guix build utils)) + (gexp (begin + (use-modules (guix build store-copy)) + (with-output-to-file + (ungexp output) + (lambda () + (write (map store-info-item + (call-with-input-file + "guile" + read-reference-graph))))) + (with-output-to-file + (ungexp output "one") + (lambda () + (write (map store-info-item + (call-with-input-file + "one" + read-reference-graph))))) + (with-output-to-file + (ungexp output "two") + (lambda () + (write (map store-info-item + (call-with-input-file + "two" + read-reference-graph))))))))) + (drv (gexp->derivation + "ref-graphs" + build + #:references-graphs + `(("one" ,one) + ("two" ,two "chbouib") + ("guile" ,%bootstrap-guile)))) + (ok? (built-derivations (list drv))) + (guile-drv + (package->derivation %bootstrap-guile)) + (bash (interned-file + (search-bootstrap-binary + "bash" + (%current-system)) + "bash" + #:recursive? + #t)) + (g-one -> (derivation->output-path drv "one")) + (g-two -> (derivation->output-path drv "two")) + (g-guile -> (derivation->output-path drv))) + (return + (and ok? + (equal? + (call-with-input-file g-one read) + (list one)) + (lset= string=? + (call-with-input-file g-two read) + (list one + (derivation->output-path + two + "chbouib"))) + (lset= string=? + (call-with-input-file g-guile read) + (list (derivation->output-path guile-drv) + bash))))) + #:guile-for-build + (%guile-for-build))) + (lambda () (close-connection store))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: gexp->derivation #:allowed-references location: /home/yoshi/guix/tests/gexp.scm:885 source: + (test-assert + "gexp->derivation #:allowed-references" + (let ((store (open-connection-for-tests))) + (dynamic-wind + (const #t) + (lambda () + (run-with-store + store + (mlet %store-monad + ((drv (gexp->derivation + "allowed-refs" + (gexp (begin + (mkdir (ungexp output)) + (chdir (ungexp output)) + (symlink (ungexp output) "self") + (symlink (ungexp %bootstrap-guile) "guile"))) + #:allowed-references + (list "out" %bootstrap-guile)))) + (built-derivations (list drv))) + #:guile-for-build + (%guile-for-build))) + (lambda () (close-connection store))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: gexp->derivation #:allowed-references, specific output location: /home/yoshi/guix/tests/gexp.scm:897 source: + (test-assert + "gexp->derivation #:allowed-references, specific output" + (let ((store (open-connection-for-tests))) + (dynamic-wind + (const #t) + (lambda () + (run-with-store + store + (mlet* %store-monad + ((in (gexp->derivation + "thing" + (gexp (begin + (mkdir (ungexp output "ok")) + (mkdir (ungexp output "not-ok")))))) + (drv (gexp->derivation + "allowed-refs" + (gexp (begin + (pk (ungexp in "not-ok")) + (mkdir (ungexp output)) + (chdir (ungexp output)) + (symlink (ungexp output) "self") + (symlink (ungexp in "ok") "ok"))) + #:allowed-references + (list "out" (gexp-input in "ok"))))) + (built-derivations (list drv))) + #:guile-for-build + (%guile-for-build))) + (lambda () (close-connection store))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: gexp->derivation #:allowed-references, disallowed location: /home/yoshi/guix/tests/gexp.scm:914 source: + (test-assert + "gexp->derivation #:allowed-references, disallowed" + (let ((drv (run-with-store + %store + (gexp->derivation + "allowed-refs" + (gexp (begin + (mkdir (ungexp output)) + (chdir (ungexp output)) + (symlink (ungexp %bootstrap-guile) "guile"))) + #:allowed-references + '())))) + (guard (c ((store-protocol-error? c) #t)) + (build-derivations %store (list drv)) + #f))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: gexp->derivation #:disallowed-references, allowed location: /home/yoshi/guix/tests/gexp.scm:926 source: + (test-assert + "gexp->derivation #:disallowed-references, allowed" + (let ((store (open-connection-for-tests))) + (dynamic-wind + (const #t) + (lambda () + (run-with-store + store + (mlet %store-monad + ((drv (gexp->derivation + "disallowed-refs" + (gexp (begin + (mkdir (ungexp output)) + (chdir (ungexp output)) + (symlink (ungexp output) "self") + (symlink (ungexp %bootstrap-guile) "guile"))) + #:disallowed-references + '()))) + (built-derivations (list drv))) + #:guile-for-build + (%guile-for-build))) + (lambda () (close-connection store))))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL test-name: gexp->derivation #:disallowed-references location: /home/yoshi/guix/tests/gexp.scm:938 source: + (test-assert + "gexp->derivation #:disallowed-references" + (let ((drv (run-with-store + %store + (gexp->derivation + "disallowed-refs" + (gexp (begin + (mkdir (ungexp output)) + (chdir (ungexp output)) + (symlink (ungexp %bootstrap-guile) "guile"))) + #:disallowed-references + (list %bootstrap-guile))))) + (guard (c ((store-protocol-error? c) #t)) + (build-derivations %store (list drv)) + #f))) actual-value: #f actual-error: + (wrong-type-arg + "struct_vtable" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "struct" #f) + (#f)) result: FAIL random seed for tests: 1548622494 warning: build daemon error: # warning: build daemon error: # warning: build daemon error: # warning: build daemon error: # warning: build daemon error: # warning: build daemon error: # warning: build daemon error: # warning: build daemon error: # warning: build daemon error: # warning: build daemon error: # warning: build daemon error: # warning: build daemon error: # warning: build daemon error: # warning: build daemon error: # warning: build daemon error: # warning: build daemon error: # warning: build daemon error: # warning: build daemon error: # warning: build daemon error: # warning: build daemon error: # warning: build daemon error: # warning: build daemon error: # warning: build daemon error: # warning: build daemon error: # warning: build daemon error: # warning: build daemon error: # warning: build daemon error: # Backtrace: 3 (primitive-load-path "tests/gexp.scm") In ice-9/eval.scm: 626:19 2 (_ #) 163:9 1 (_ #) In guix/derivations.scm: 596:28 0 (derivation->output-path #f _) guix/derivations.scm:596:28: In procedure derivation->output-path: In procedure struct_vtable: Wrong type argument in position 1 (expecting struct): #f