test-name: no refs location: /home/rsd/v/git/others/guix/tests/gexp.scm:71 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/rsd/v/git/others/guix/tests/gexp.scm:78 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/rsd/v/git/others/guix/tests/gexp.scm:85 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 origin location: /home/rsd/v/git/others/guix/tests/gexp.scm:95 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/rsd/v/git/others/guix/tests/gexp.scm:106 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/rsd/v/git/others/guix/tests/gexp.scm:118 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/rsd/v/git/others/guix/tests/gexp.scm:137 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/rsd/v/git/others/guix/guix/base32.scm actual-value: /home/rsd/v/git/others/guix/guix/base32.scm result: PASS test-name: local-file, #:select? location: /home/rsd/v/git/others/guix/tests/gexp.scm:145 source: + (test-assert + "local-file, #:select?" + (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))) 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/rsd/v/git/others/guix/tests/gexp.scm:160 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/rsd/v/git/others/guix/tests/gexp.scm:170 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/rsd/v/git/others/guix/tests/gexp.scm:182 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/rsd/v/git/others/guix/tests/gexp.scm:210 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/rsd/v/git/others/guix/tests/gexp.scm:223 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/rsd/v/git/others/guix/tests/gexp.scm:236 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/rsd/v/git/others/guix/tests/gexp.scm:251 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/rsd/v/git/others/guix/tests/gexp.scm:274 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: input list location: /home/rsd/v/git/others/guix/tests/gexp.scm:280 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/rsd/v/git/others/guix/tests/gexp.scm:293 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/rsd/v/git/others/guix/tests/gexp.scm:315 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/rsd/v/git/others/guix/tests/gexp.scm:329 source: + (test-assert + "input list splicing + ungexp-native-splicing" + (let* ((inputs + (list (gexp-input glibc "debug") + %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: output list location: /home/rsd/v/git/others/guix/tests/gexp.scm:339 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/rsd/v/git/others/guix/tests/gexp.scm:345 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/rsd/v/git/others/guix/tests/gexp.scm:354 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/rsd/v/git/others/guix/tests/gexp.scm:361 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/rsd/v/git/others/guix/tests/gexp.scm:371 source: + (test-assert + "gexp->file" + (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 ((store-lift references) out))) + (return + (and (equal? sexp (call-with-input-file out read)) + (equal? (list guile) refs)))) + #:guile-for-build + (%guile-for-build))) 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/rsd/v/git/others/guix/tests/gexp.scm:382 source: + (test-assert + "gexp->file + file-append" + (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 ((store-lift 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))) 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/rsd/v/git/others/guix/tests/gexp.scm:394 source: + (test-assert + "gexp->derivation" + (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 ((store-lift references) out)) + (refs2 ((store-lift 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))))) + #:guile-for-build + (%guile-for-build))) 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/rsd/v/git/others/guix/tests/gexp.scm:418 source: + (test-assert + "gexp->derivation vs. grafts" + (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))) 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/rsd/v/git/others/guix/tests/gexp.scm:437 source: + (test-assert + "gexp->derivation, composed gexps" + (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))) 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/rsd/v/git/others/guix/tests/gexp.scm:453 source: + (test-assert + "gexp->derivation, default system" + (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))) 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/rsd/v/git/others/guix/tests/gexp.scm:464 source: + (test-assert + "gexp->derivation, local-file" + (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))) 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/rsd/v/git/others/guix/tests/gexp.scm:478 source: + (test-assert + "gexp->derivation, cross-compilation" + (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 ((store-lift 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))) 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/rsd/v/git/others/guix/tests/gexp.scm:492 source: + (test-assert + "gexp->derivation, ungexp-native" + (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))) 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/rsd/v/git/others/guix/tests/gexp.scm:502 source: + (test-assert + "gexp->derivation, ungexp + ungexp-native" + (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 ((store-lift 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))) 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/rsd/v/git/others/guix/tests/gexp.scm:516 source: + (test-assert + "gexp->derivation, ungexp-native + composed gexps" + (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))) 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/rsd/v/git/others/guix/tests/gexp.scm:527 source: + (test-assert + "gexp->derivation, store copy" + (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 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))) 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/rsd/v/git/others/guix/tests/gexp.scm:562 source: + (test-assert + "imported-files" + (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")))) + (drv (imported-files files))) + (mbegin + %store-monad + (built-derivations (list drv)) + (let ((dir (derivation->output-path drv))) + (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))) 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/rsd/v/git/others/guix/tests/gexp.scm:582 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/rsd/v/git/others/guix/tests/gexp.scm:588 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->derivation #:modules location: /home/rsd/v/git/others/guix/tests/gexp.scm:594 source: + (test-assert + "gexp->derivation #:modules" + (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))) 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/rsd/v/git/others/guix/tests/gexp.scm:608 source: + (test-assert + "gexp->derivation & with-imported-modules" + (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))) 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/rsd/v/git/others/guix/tests/gexp.scm:623 source: + (test-assert + "gexp->derivation & nested with-imported-modules" + (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))) 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/rsd/v/git/others/guix/tests/gexp.scm:652 source: + (test-assert + "gexp->derivation #:references-graphs" + (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 build utils)) + (gexp (begin + (use-modules (guix build store-copy)) + (with-output-to-file + (ungexp output) + (lambda () + (write (call-with-input-file + "guile" + read-reference-graph)))) + (with-output-to-file + (ungexp output "one") + (lambda () + (write (call-with-input-file + "one" + read-reference-graph)))) + (with-output-to-file + (ungexp output "two") + (lambda () + (write (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))) 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/rsd/v/git/others/guix/tests/gexp.scm:696 source: + (test-assert + "gexp->derivation #:allowed-references" + (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))) 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/rsd/v/git/others/guix/tests/gexp.scm:708 source: + (test-assert + "gexp->derivation #:allowed-references, specific output" + (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))) 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/rsd/v/git/others/guix/tests/gexp.scm:725 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 ((nix-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/rsd/v/git/others/guix/tests/gexp.scm:737 source: + (test-assert + "gexp->derivation #:disallowed-references, allowed" + (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))) 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/rsd/v/git/others/guix/tests/gexp.scm:749 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 ((nix-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: 1473544935 warning: build daemon error: # Backtrace: In ice-9/boot-9.scm: 157: 12 [catch #t # ...] In unknown file: ?: 11 [apply-smob/1 #] In ice-9/boot-9.scm: 63: 10 [call-with-prompt prompt0 ...] In ice-9/eval.scm: 432: 9 [eval # #] 432: 8 [eval # #] 432: 7 [eval # #] In ice-9/r4rs.scm: 90: 6 [dynamic-wind # ...] In ice-9/boot-9.scm: 1724: 5 [%start-stack load-stack #] 1729: 4 [#] In unknown file: ?: 3 [primitive-load-path "tests/gexp.scm"] In ice-9/eval.scm: 453: 2 [eval # ()] 387: 1 [eval # ()] In guix/derivations.scm: 565: 0 [derivation->output-path #f "out"] guix/derivations.scm:565:28: In procedure derivation->output-path: guix/derivations.scm:565:28: In procedure struct_vtable: Wrong type argument in position 1 (expecting struct): #f