* bug#31030: failing test-suite
@ 2018-04-02 20:31 Martin Castillo
2018-04-02 21:49 ` Ludovic Courtès
0 siblings, 1 reply; 2+ messages in thread
From: Martin Castillo @ 2018-04-02 20:31 UTC (permalink / raw)
To: 31030
[-- Attachment #1.1.1: Type: text/plain, Size: 155 bytes --]
on a raspberry pi, guix 75afbd247876d62f27cb2c90098bd59040f7e614 fails
the test-suite.
--
GPG: 7FDE 7190 2F73 2C50 236E 403D CC13 48F1 E644 08EC
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1.2: pi-test-suite.log --]
[-- Type: text/x-log; name="pi-test-suite.log", Size: 178033 bytes --]
========================================
GNU Guix UNKNOWN: ./test-suite.log
========================================
# TOTAL: 187
# PASS: 166
# SKIP: 13
# XFAIL: 0
# FAIL: 8
# XPASS: 0
# ERROR: 0
.. contents:: :depth: 2
FAIL: tests/lint
================
test-name: description: not a string
location: /home/pi/code/guix/tests/lint.scm:74
source:
+ (test-assert
+ "description: not a string"
+ (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (dummy-package "x" (description 'foobar))))
+ (check-description-style pkg)))
+ "invalid description")))
actual-value: #t
result: PASS
test-name: description: not empty
location: /home/pi/code/guix/tests/lint.scm:82
source:
+ (test-assert
+ "description: not empty"
+ (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (dummy-package "x" (description ""))))
+ (check-description-style pkg)))
+ "description should not be empty")))
actual-value: #t
result: PASS
test-name: description: valid Texinfo markup
location: /home/pi/code/guix/tests/lint.scm:90
source:
+ (test-assert
+ "description: valid Texinfo markup"
+ (->bool
+ (string-contains
+ (with-warnings
+ (check-description-style
+ (dummy-package "x" (description "f{oo}b@r"))))
+ "Texinfo markup in description is invalid")))
actual-value: #t
result: PASS
test-name: description: does not start with an upper-case letter
location: /home/pi/code/guix/tests/lint.scm:97
source:
+ (test-assert
+ "description: does not start with an upper-case letter"
+ (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (dummy-package
+ "x"
+ (description "bad description."))))
+ (check-description-style pkg)))
+ "description should start with an upper-case letter")))
actual-value: #t
result: PASS
test-name: description: may start with a digit
location: /home/pi/code/guix/tests/lint.scm:105
source:
+ (test-assert
+ "description: may start with a digit"
+ (string-null?
+ (with-warnings
+ (let ((pkg (dummy-package
+ "x"
+ (description "2-component library."))))
+ (check-description-style pkg)))))
actual-value: #t
result: PASS
test-name: description: may start with lower-case package name
location: /home/pi/code/guix/tests/lint.scm:112
source:
+ (test-assert
+ "description: may start with lower-case package name"
+ (string-null?
+ (with-warnings
+ (let ((pkg (dummy-package
+ "x"
+ (description "x is a dummy package."))))
+ (check-description-style pkg)))))
actual-value: #t
result: PASS
test-name: description: two spaces after end of sentence
location: /home/pi/code/guix/tests/lint.scm:119
source:
+ (test-assert
+ "description: two spaces after end of sentence"
+ (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (dummy-package
+ "x"
+ (description "Bad. Quite bad."))))
+ (check-description-style pkg)))
+ "sentences in description should be followed by two spaces")))
actual-value: #t
result: PASS
test-name: description: end-of-sentence detection with abbreviations
location: /home/pi/code/guix/tests/lint.scm:127
source:
+ (test-assert
+ "description: end-of-sentence detection with abbreviations"
+ (string-null?
+ (with-warnings
+ (let ((pkg (dummy-package
+ "x"
+ (description
+ "E.g. Foo, i.e. Bar resp. Baz (a.k.a. DVD)."))))
+ (check-description-style pkg)))))
actual-value: #t
result: PASS
test-name: description: may not contain trademark signs
location: /home/pi/code/guix/tests/lint.scm:135
source:
+ (test-assert
+ "description: may not contain trademark signs"
+ (and (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (dummy-package
+ "x"
+ (description "Does The Right Thing™"))))
+ (check-description-style pkg)))
+ "should not contain trademark sign"))
+ (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (dummy-package
+ "x"
+ (description "Works with Format®"))))
+ (check-description-style pkg)))
+ "should not contain trademark sign"))))
actual-value: #t
result: PASS
test-name: description: suggest ornament instead of quotes
location: /home/pi/code/guix/tests/lint.scm:149
source:
+ (test-assert
+ "description: suggest ornament instead of quotes"
+ (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (dummy-package
+ "x"
+ (description "This is a 'quoted' thing."))))
+ (check-description-style pkg)))
+ "use @code")))
actual-value: #t
result: PASS
test-name: synopsis: not a string
location: /home/pi/code/guix/tests/lint.scm:157
source:
+ (test-assert
+ "synopsis: not a string"
+ (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (dummy-package "x" (synopsis #f))))
+ (check-synopsis-style pkg)))
+ "invalid synopsis")))
actual-value: #t
result: PASS
test-name: synopsis: not empty
location: /home/pi/code/guix/tests/lint.scm:165
source:
+ (test-assert
+ "synopsis: not empty"
+ (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (dummy-package "x" (synopsis ""))))
+ (check-synopsis-style pkg)))
+ "synopsis should not be empty")))
actual-value: #t
result: PASS
test-name: synopsis: valid Texinfo markup
location: /home/pi/code/guix/tests/lint.scm:173
source:
+ (test-assert
+ "synopsis: valid Texinfo markup"
+ (->bool
+ (string-contains
+ (with-warnings
+ (check-synopsis-style
+ (dummy-package "x" (synopsis "Bad $@ texinfo"))))
+ "Texinfo markup in synopsis is invalid")))
actual-value: #t
result: PASS
test-name: synopsis: does not start with an upper-case letter
location: /home/pi/code/guix/tests/lint.scm:180
source:
+ (test-assert
+ "synopsis: does not start with an upper-case letter"
+ (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (dummy-package "x" (synopsis "bad synopsis."))))
+ (check-synopsis-style pkg)))
+ "synopsis should start with an upper-case letter")))
actual-value: #t
result: PASS
test-name: synopsis: may start with a digit
location: /home/pi/code/guix/tests/lint.scm:188
source:
+ (test-assert
+ "synopsis: may start with a digit"
+ (string-null?
+ (with-warnings
+ (let ((pkg (dummy-package
+ "x"
+ (synopsis "5-dimensional frobnicator"))))
+ (check-synopsis-style pkg)))))
actual-value: #t
result: PASS
test-name: synopsis: ends with a period
location: /home/pi/code/guix/tests/lint.scm:195
source:
+ (test-assert
+ "synopsis: ends with a period"
+ (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (dummy-package "x" (synopsis "Bad synopsis."))))
+ (check-synopsis-style pkg)))
+ "no period allowed at the end of the synopsis")))
actual-value: #t
result: PASS
test-name: synopsis: ends with 'etc.'
location: /home/pi/code/guix/tests/lint.scm:203
source:
+ (test-assert
+ "synopsis: ends with 'etc.'"
+ (string-null?
+ (with-warnings
+ (let ((pkg (dummy-package "x" (synopsis "Foo, bar, etc."))))
+ (check-synopsis-style pkg)))))
actual-value: #t
result: PASS
test-name: synopsis: starts with 'A'
location: /home/pi/code/guix/tests/lint.scm:209
source:
+ (test-assert
+ "synopsis: starts with 'A'"
+ (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (dummy-package "x" (synopsis "A bad synopŝis"))))
+ (check-synopsis-style pkg)))
+ "no article allowed at the beginning of the synopsis")))
actual-value: #t
result: PASS
test-name: synopsis: starts with 'An'
location: /home/pi/code/guix/tests/lint.scm:217
source:
+ (test-assert
+ "synopsis: starts with 'An'"
+ (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (dummy-package
+ "x"
+ (synopsis "An awful synopsis"))))
+ (check-synopsis-style pkg)))
+ "no article allowed at the beginning of the synopsis")))
actual-value: #t
result: PASS
test-name: synopsis: starts with 'a'
location: /home/pi/code/guix/tests/lint.scm:225
source:
+ (test-assert
+ "synopsis: starts with 'a'"
+ (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (dummy-package "x" (synopsis "a bad synopsis"))))
+ (check-synopsis-style pkg)))
+ "no article allowed at the beginning of the synopsis")))
actual-value: #t
result: PASS
test-name: synopsis: starts with 'an'
location: /home/pi/code/guix/tests/lint.scm:233
source:
+ (test-assert
+ "synopsis: starts with 'an'"
+ (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (dummy-package
+ "x"
+ (synopsis "an awful synopsis"))))
+ (check-synopsis-style pkg)))
+ "no article allowed at the beginning of the synopsis")))
actual-value: #t
result: PASS
test-name: synopsis: too long
location: /home/pi/code/guix/tests/lint.scm:241
source:
+ (test-assert
+ "synopsis: too long"
+ (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (dummy-package
+ "x"
+ (synopsis (make-string 80 #\x)))))
+ (check-synopsis-style pkg)))
+ "synopsis should be less than 80 characters long")))
actual-value: #t
result: PASS
test-name: synopsis: start with package name
location: /home/pi/code/guix/tests/lint.scm:249
source:
+ (test-assert
+ "synopsis: start with package name"
+ (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (dummy-package
+ "x"
+ (name "foo")
+ (synopsis "foo, a nice package"))))
+ (check-synopsis-style pkg)))
+ "synopsis should not start with the package name")))
actual-value: #t
result: PASS
test-name: synopsis: start with package name prefix
location: /home/pi/code/guix/tests/lint.scm:258
source:
+ (test-assert
+ "synopsis: start with package name prefix"
+ (string-null?
+ (with-warnings
+ (let ((pkg (dummy-package
+ "arb"
+ (synopsis "Arbitrary precision"))))
+ (check-synopsis-style pkg)))))
actual-value: #t
result: PASS
test-name: synopsis: start with abbreviation
location: /home/pi/code/guix/tests/lint.scm:265
source:
+ (test-assert
+ "synopsis: start with abbreviation"
+ (string-null?
+ (with-warnings
+ (let ((pkg (dummy-package
+ "uucp"
+ (synopsis "UUCP implementation")
+ (description "Imagine this is Taylor UUCP."))))
+ (check-synopsis-style pkg)))))
actual-value: #t
result: PASS
test-name: inputs: pkg-config is probably a native input
location: /home/pi/code/guix/tests/lint.scm:274
source:
+ (test-assert
+ "inputs: pkg-config is probably a native input"
+ (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (dummy-package
+ "x"
+ (inputs `(("pkg-config" ,pkg-config))))))
+ (check-inputs-should-be-native pkg)))
+ "'pkg-config' should probably be a native input")))
actual-value: #t
result: PASS
test-name: inputs: glib:bin is probably a native input
location: /home/pi/code/guix/tests/lint.scm:283
source:
+ (test-assert
+ "inputs: glib:bin is probably a native input"
+ (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (dummy-package
+ "x"
+ (inputs `(("glib" ,glib "bin"))))))
+ (check-inputs-should-be-native pkg)))
+ "'glib:bin' should probably be a native input")))
actual-value: #t
result: PASS
test-name: inputs: python-setuptools should not be an input at all (input)
location: /home/pi/code/guix/tests/lint.scm:292
source:
+ (test-assert
+ "inputs: python-setuptools should not be an input at all (input)"
+ (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (dummy-package
+ "x"
+ (inputs
+ `(("python-setuptools" ,python-setuptools))))))
+ (check-inputs-should-not-be-an-input-at-all pkg)))
+ "'python-setuptools' should probably not be an input at all")))
actual-value: #t
result: PASS
test-name: inputs: python-setuptools should not be an input at all (native-input)
location: /home/pi/code/guix/tests/lint.scm:302
source:
+ (test-assert
+ "inputs: python-setuptools should not be an input at all (native-input)"
+ (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (dummy-package
+ "x"
+ (native-inputs
+ `(("python-setuptools" ,python-setuptools))))))
+ (check-inputs-should-not-be-an-input-at-all pkg)))
+ "'python-setuptools' should probably not be an input at all")))
actual-value: #t
result: PASS
test-name: inputs: python-setuptools should not be an input at all (propagated-input)
location: /home/pi/code/guix/tests/lint.scm:313
source:
+ (test-assert
+ "inputs: python-setuptools should not be an input at all (propagated-input)"
+ (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (dummy-package
+ "x"
+ (propagated-inputs
+ `(("python-setuptools" ,python-setuptools))))))
+ (check-inputs-should-not-be-an-input-at-all pkg)))
+ "'python-setuptools' should probably not be an input at all")))
actual-value: #t
result: PASS
test-name: patches: file names
location: /home/pi/code/guix/tests/lint.scm:324
source:
+ (test-assert
+ "patches: file names"
+ (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (dummy-package
+ "x"
+ (source
+ (dummy-origin
+ (patches (list "/path/to/y.patch")))))))
+ (check-patch-file-names pkg)))
+ "file names of patches should start with the package name")))
actual-value: #t
result: PASS
test-name: patches: file name too long
location: /home/pi/code/guix/tests/lint.scm:335
source:
+ (test-assert
+ "patches: file name too long"
+ (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (dummy-package
+ "x"
+ (source
+ (dummy-origin
+ (patches
+ (list (string-append
+ "x-"
+ (make-string 100 #\a)
+ ".patch"))))))))
+ (check-patch-file-names pkg)))
+ "file name is too long")))
actual-value: #t
result: PASS
test-name: patches: not found
location: /home/pi/code/guix/tests/lint.scm:348
source:
+ (test-assert
+ "patches: not found"
+ (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (dummy-package
+ "x"
+ (source
+ (dummy-origin
+ (patches
+ (list (search-patch
+ "this-patch-does-not-exist!"))))))))
+ (check-patch-file-names pkg)))
+ "patch not found")))
actual-value: #t
result: PASS
test-name: derivation: invalid arguments
location: /home/pi/code/guix/tests/lint.scm:360
source:
+ (test-assert
+ "derivation: invalid arguments"
+ (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (dummy-package
+ "x"
+ (arguments
+ '(#:imported-modules (invalid-module))))))
+ (check-derivation pkg)))
+ "failed to create derivation")))
actual-value: #t
result: PASS
test-name: license: invalid license
location: /home/pi/code/guix/tests/lint.scm:370
source:
+ (test-assert
+ "license: invalid license"
+ (string-contains
+ (with-warnings
+ (check-license (dummy-package "x" (license #f))))
+ "invalid license"))
actual-value: 47
result: PASS
test-name: home-page: wrong home-page
location: /home/pi/code/guix/tests/lint.scm:376
source:
+ (test-assert
+ "home-page: wrong home-page"
+ (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (package
+ (inherit (dummy-package "x"))
+ (home-page #f))))
+ (check-home-page pkg)))
+ "invalid")))
actual-value: #f
actual-error:
+ (wrong-type-arg
+ #f
+ "Wrong type to apply: ~S"
+ (#<syntax-transformer uri?>)
+ (#<syntax-transformer uri?>))
result: FAIL
test-name: home-page: invalid URI
location: /home/pi/code/guix/tests/lint.scm:386
source:
+ (test-assert
+ "home-page: invalid URI"
+ (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (package
+ (inherit (dummy-package "x"))
+ (home-page "foobar"))))
+ (check-home-page pkg)))
+ "invalid home page URL")))
actual-value: #f
actual-error:
+ (wrong-type-arg
+ #f
+ "Wrong type to apply: ~S"
+ (#<syntax-transformer uri?>)
+ (#<syntax-transformer uri?>))
result: FAIL
test-name: home-page: host not found
location: /home/pi/code/guix/tests/lint.scm:396
source:
+ (test-assert
+ "home-page: host not found"
+ (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (package
+ (inherit (dummy-package "x"))
+ (home-page "http://does-not-exist"))))
+ (check-home-page pkg)))
+ "domain not found")))
actual-value: #f
actual-error:
+ (wrong-type-arg
+ #f
+ "Wrong type to apply: ~S"
+ (#<syntax-transformer uri?>)
+ (#<syntax-transformer uri?>))
result: FAIL
test-name: home-page: Connection refused
location: /home/pi/code/guix/tests/lint.scm:407
source:
+ (test-assert
+ "home-page: Connection refused"
+ (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (package
+ (inherit (dummy-package "x"))
+ (home-page (%local-url)))))
+ (check-home-page pkg)))
+ "Connection refused")))
actual-value: #f
actual-error:
+ (wrong-type-arg
+ #f
+ "Wrong type to apply: ~S"
+ (#<syntax-transformer uri?>)
+ (#<syntax-transformer uri?>))
result: FAIL
test-name: home-page: 200
location: /home/pi/code/guix/tests/lint.scm:418
source:
+ (test-equal
+ "home-page: 200"
+ ""
+ (with-warnings
+ (with-http-server
+ 200
+ %long-string
+ (let ((pkg (package
+ (inherit (dummy-package "x"))
+ (home-page (%local-url)))))
+ (check-home-page pkg)))))
expected-value: ""
actual-value: #f
actual-error:
+ (wrong-type-arg
+ #f
+ "Wrong type to apply: ~S"
+ (#<syntax-transformer uri?>)
+ (#<syntax-transformer uri?>))
result: FAIL
test-name: home-page: 200 but short length
location: /home/pi/code/guix/tests/lint.scm:428
source:
+ (test-assert
+ "home-page: 200 but short length"
+ (->bool
+ (string-contains
+ (with-warnings
+ (with-http-server
+ 200
+ "This is too small."
+ (let ((pkg (package
+ (inherit (dummy-package "x"))
+ (home-page (%local-url)))))
+ (check-home-page pkg))))
+ "suspiciously small")))
result: SKIP
test-name: home-page: 404
location: /home/pi/code/guix/tests/lint.scm:440
source:
+ (test-assert
+ "home-page: 404"
+ (->bool
+ (string-contains
+ (with-warnings
+ (with-http-server
+ 404
+ %long-string
+ (let ((pkg (package
+ (inherit (dummy-package "x"))
+ (home-page (%local-url)))))
+ (check-home-page pkg))))
+ "not reachable: 404")))
result: SKIP
test-name: home-page: 301, invalid
location: /home/pi/code/guix/tests/lint.scm:452
source:
+ (test-assert
+ "home-page: 301, invalid"
+ (->bool
+ (string-contains
+ (with-warnings
+ (with-http-server
+ 301
+ %long-string
+ (let ((pkg (package
+ (inherit (dummy-package "x"))
+ (home-page (%local-url)))))
+ (check-home-page pkg))))
+ "invalid permanent redirect")))
result: SKIP
test-name: home-page: 301 -> 200
location: /home/pi/code/guix/tests/lint.scm:464
source:
+ (test-assert
+ "home-page: 301 -> 200"
+ (->bool
+ (string-contains
+ (with-warnings
+ (with-http-server
+ 200
+ %long-string
+ (let ((initial-url (%local-url)))
+ (parameterize
+ ((%http-server-port (+ 1 (%http-server-port))))
+ (with-http-server
+ (301
+ `((location unquote (string->uri initial-url))))
+ ""
+ (let ((pkg (package
+ (inherit (dummy-package "x"))
+ (home-page (%local-url)))))
+ (check-home-page pkg)))))))
+ "permanent redirect")))
result: SKIP
test-name: home-page: 301 -> 404
location: /home/pi/code/guix/tests/lint.scm:481
source:
+ (test-assert
+ "home-page: 301 -> 404"
+ (->bool
+ (string-contains
+ (with-warnings
+ (with-http-server
+ 404
+ "booh!"
+ (let ((initial-url (%local-url)))
+ (parameterize
+ ((%http-server-port (+ 1 (%http-server-port))))
+ (with-http-server
+ (301
+ `((location unquote (string->uri initial-url))))
+ ""
+ (let ((pkg (package
+ (inherit (dummy-package "x"))
+ (home-page (%local-url)))))
+ (check-home-page pkg)))))))
+ "not reachable: 404")))
result: SKIP
test-name: source-file-name
location: /home/pi/code/guix/tests/lint.scm:497
source:
+ (test-assert
+ "source-file-name"
+ (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (dummy-package
+ "x"
+ (version "3.2.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri "http://www.example.com/3.2.1.tar.gz")
+ (sha256 %null-sha256))))))
+ (check-source-file-name pkg)))
+ "file name should contain the package name")))
actual-value: #t
result: PASS
test-name: source-file-name: v prefix
location: /home/pi/code/guix/tests/lint.scm:511
source:
+ (test-assert
+ "source-file-name: v prefix"
+ (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (dummy-package
+ "x"
+ (version "3.2.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri "http://www.example.com/v3.2.1.tar.gz")
+ (sha256 %null-sha256))))))
+ (check-source-file-name pkg)))
+ "file name should contain the package name")))
actual-value: #t
result: PASS
test-name: source-file-name: bad checkout
location: /home/pi/code/guix/tests/lint.scm:525
source:
+ (test-assert
+ "source-file-name: bad checkout"
+ (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (dummy-package
+ "x"
+ (version "3.2.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "http://www.example.com/x.git")
+ (commit "0")))
+ (sha256 %null-sha256))))))
+ (check-source-file-name pkg)))
+ "file name should contain the package name")))
actual-value: #t
result: PASS
test-name: source-file-name: good checkout
location: /home/pi/code/guix/tests/lint.scm:541
source:
+ (test-assert
+ "source-file-name: good checkout"
+ (not (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (dummy-package
+ "x"
+ (version "3.2.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "http://git.example.com/x.git")
+ (commit "0")))
+ (file-name (string-append "x-" version))
+ (sha256 %null-sha256))))))
+ (check-source-file-name pkg)))
+ "file name should contain the package name"))))
actual-value: #t
result: PASS
test-name: source-file-name: valid
location: /home/pi/code/guix/tests/lint.scm:559
source:
+ (test-assert
+ "source-file-name: valid"
+ (not (->bool
+ (string-contains
+ (with-warnings
+ (let ((pkg (dummy-package
+ "x"
+ (version "3.2.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri "http://www.example.com/x-3.2.1.tar.gz")
+ (sha256 %null-sha256))))))
+ (check-source-file-name pkg)))
+ "file name should contain the package name"))))
actual-value: #t
result: PASS
test-name: source: 200
location: /home/pi/code/guix/tests/lint.scm:575
source:
+ (test-equal
+ "source: 200"
+ ""
+ (with-warnings
+ (with-http-server
+ 200
+ %long-string
+ (let ((pkg (package
+ (inherit (dummy-package "x"))
+ (source
+ (origin
+ (method url-fetch)
+ (uri (%local-url))
+ (sha256 %null-sha256))))))
+ (check-source pkg)))))
result: SKIP
test-name: source: 200 but short length
location: /home/pi/code/guix/tests/lint.scm:588
source:
+ (test-assert
+ "source: 200 but short length"
+ (->bool
+ (string-contains
+ (with-warnings
+ (with-http-server
+ 200
+ "This is too small."
+ (let ((pkg (package
+ (inherit (dummy-package "x"))
+ (source
+ (origin
+ (method url-fetch)
+ (uri (%local-url))
+ (sha256 %null-sha256))))))
+ (check-source pkg))))
+ "suspiciously small")))
result: SKIP
test-name: source: 404
location: /home/pi/code/guix/tests/lint.scm:603
source:
+ (test-assert
+ "source: 404"
+ (->bool
+ (string-contains
+ (with-warnings
+ (with-http-server
+ 404
+ %long-string
+ (let ((pkg (package
+ (inherit (dummy-package "x"))
+ (source
+ (origin
+ (method url-fetch)
+ (uri (%local-url))
+ (sha256 %null-sha256))))))
+ (check-source pkg))))
+ "not reachable: 404")))
result: SKIP
test-name: source: 301 -> 200
location: /home/pi/code/guix/tests/lint.scm:618
source:
+ (test-equal
+ "source: 301 -> 200"
+ ""
+ (with-warnings
+ (with-http-server
+ 200
+ %long-string
+ (let ((initial-url (%local-url)))
+ (parameterize
+ ((%http-server-port (+ 1 (%http-server-port))))
+ (with-http-server
+ (301
+ `((location unquote (string->uri initial-url))))
+ ""
+ (let ((pkg (package
+ (inherit (dummy-package "x"))
+ (source
+ (origin
+ (method url-fetch)
+ (uri (%local-url))
+ (sha256 %null-sha256))))))
+ (check-source pkg))))))))
result: SKIP
test-name: source: 301 -> 404
location: /home/pi/code/guix/tests/lint.scm:635
source:
+ (test-assert
+ "source: 301 -> 404"
+ (->bool
+ (string-contains
+ (with-warnings
+ (with-http-server
+ 404
+ "booh!"
+ (let ((initial-url (%local-url)))
+ (parameterize
+ ((%http-server-port (+ 1 (%http-server-port))))
+ (with-http-server
+ (301
+ `((location unquote (string->uri initial-url))))
+ ""
+ (let ((pkg (package
+ (inherit (dummy-package "x"))
+ (source
+ (origin
+ (method url-fetch)
+ (uri (%local-url))
+ (sha256 %null-sha256))))))
+ (check-source pkg)))))))
+ "not reachable: 404")))
result: SKIP
test-name: mirror-url
location: /home/pi/code/guix/tests/lint.scm:653
source:
+ (test-assert
+ "mirror-url"
+ (string-null?
+ (with-warnings
+ (let ((source
+ (origin
+ (method url-fetch)
+ (uri "http://example.org/foo/bar.tar.gz")
+ (sha256 %null-sha256))))
+ (check-mirror-url
+ (dummy-package "x" (source source)))))))
actual-value: #t
result: PASS
test-name: mirror-url: one suggestion
location: /home/pi/code/guix/tests/lint.scm:662
source:
+ (test-assert
+ "mirror-url: one suggestion"
+ (string-contains
+ (with-warnings
+ (let ((source
+ (origin
+ (method url-fetch)
+ (uri "http://ftp.gnu.org/pub/gnu/foo/foo.tar.gz")
+ (sha256 %null-sha256))))
+ (check-mirror-url
+ (dummy-package "x" (source source)))))
+ "mirror://gnu/foo/foo.tar.gz"))
actual-value: 62
result: PASS
test-name: cve
location: /home/pi/code/guix/tests/lint.scm:672
source:
+ (test-assert
+ "cve"
+ (mock ((guix scripts lint)
+ package-vulnerabilities
+ (const '()))
+ (string-null?
+ (with-warnings
+ (check-vulnerabilities (dummy-package "x"))))))
actual-value: #t
result: PASS
test-name: cve: one vulnerability
location: /home/pi/code/guix/tests/lint.scm:677
source:
+ (test-assert
+ "cve: one vulnerability"
+ (mock ((guix scripts lint)
+ package-vulnerabilities
+ (lambda (package)
+ (list (make-struct
+ (@@ (guix cve) <vulnerability>)
+ 0
+ "CVE-2015-1234"
+ (list (cons (package-name package)
+ (package-version package)))))))
+ (string-contains
+ (with-warnings
+ (check-vulnerabilities
+ (dummy-package "pi" (version "3.14"))))
+ "vulnerable to CVE-2015-1234")))
actual-value: 60
result: PASS
test-name: cve: one patched vulnerability
location: /home/pi/code/guix/tests/lint.scm:689
source:
+ (test-assert
+ "cve: one patched vulnerability"
+ (mock ((guix scripts lint)
+ package-vulnerabilities
+ (lambda (package)
+ (list (make-struct
+ (@@ (guix cve) <vulnerability>)
+ 0
+ "CVE-2015-1234"
+ (list (cons (package-name package)
+ (package-version package)))))))
+ (string-null?
+ (with-warnings
+ (check-vulnerabilities
+ (dummy-package
+ "pi"
+ (version "3.14")
+ (source
+ (dummy-origin
+ (patches (list "/a/b/pi-CVE-2015-1234.patch"))))))))))
actual-value: #t
result: PASS
test-name: cve: known safe from vulnerability
location: /home/pi/code/guix/tests/lint.scm:706
source:
+ (test-assert
+ "cve: known safe from vulnerability"
+ (mock ((guix scripts lint)
+ package-vulnerabilities
+ (lambda (package)
+ (list (make-struct
+ (@@ (guix cve) <vulnerability>)
+ 0
+ "CVE-2015-1234"
+ (list (cons (package-name package)
+ (package-version package)))))))
+ (string-null?
+ (with-warnings
+ (check-vulnerabilities
+ (dummy-package
+ "pi"
+ (version "3.14")
+ (properties `((lint-hidden-cve "CVE-2015-1234")))))))))
actual-value: #t
result: PASS
test-name: cve: vulnerability fixed in replacement version
location: /home/pi/code/guix/tests/lint.scm:720
source:
+ (test-assert
+ "cve: vulnerability fixed in replacement version"
+ (mock ((guix scripts lint)
+ package-vulnerabilities
+ (lambda (package)
+ (match (package-version package)
+ ("0"
+ (list (make-struct
+ (@@ (guix cve) <vulnerability>)
+ 0
+ "CVE-2015-1234"
+ (list (cons (package-name package)
+ (package-version package))))))
+ ("1" '()))))
+ (and (not (string-null?
+ (with-warnings
+ (check-vulnerabilities
+ (dummy-package "foo" (version "0"))))))
+ (string-null?
+ (with-warnings
+ (check-vulnerabilities
+ (dummy-package
+ "foo"
+ (version "0")
+ (replacement (dummy-package "foo" (version "1"))))))))))
actual-value: #t
result: PASS
test-name: cve: patched vulnerability in replacement
location: /home/pi/code/guix/tests/lint.scm:742
source:
+ (test-assert
+ "cve: patched vulnerability in replacement"
+ (mock ((guix scripts lint)
+ package-vulnerabilities
+ (lambda (package)
+ (list (make-struct
+ (@@ (guix cve) <vulnerability>)
+ 0
+ "CVE-2015-1234"
+ (list (cons (package-name package)
+ (package-version package)))))))
+ (string-null?
+ (with-warnings
+ (check-vulnerabilities
+ (dummy-package
+ "pi"
+ (version "3.14")
+ (source (dummy-origin))
+ (replacement
+ (dummy-package
+ "pi"
+ (version "3.14")
+ (source
+ (dummy-origin
+ (patches
+ (list "/a/b/pi-CVE-2015-1234.patch"))))))))))))
actual-value: #t
result: PASS
test-name: formatting: lonely parentheses
location: /home/pi/code/guix/tests/lint.scm:761
source:
+ (test-assert
+ "formatting: lonely parentheses"
+ (string-contains
+ (with-warnings
+ (check-formatting
+ (dummy-package "ugly as hell!")))
+ "lonely"))
actual-value: 85
result: PASS
test-name: formatting: tabulation
location: /home/pi/code/guix/tests/lint.scm:771
source:
+ (test-assert
+ "formatting: tabulation"
+ (string-contains
+ (with-warnings
+ (check-formatting
+ (dummy-package "leave the tab here:\t")))
+ "tabulation"))
actual-value: 66
result: PASS
test-name: formatting: trailing white space
location: /home/pi/code/guix/tests/lint.scm:777
source:
+ (test-assert
+ "formatting: trailing white space"
+ (string-contains
+ (with-warnings
+ (check-formatting (dummy-package "x")))
+ "trailing white space"))
actual-value: 47
result: PASS
test-name: formatting: long line
location: /home/pi/code/guix/tests/lint.scm:784
source:
+ (test-assert
+ "formatting: long line"
+ (string-contains
+ (with-warnings
+ (check-formatting (dummy-package "x")))
+ "too long"))
actual-value: 62
result: PASS
test-name: formatting: alright
location: /home/pi/code/guix/tests/lint.scm:792
source:
+ (test-assert
+ "formatting: alright"
+ (string-null?
+ (with-warnings
+ (check-formatting (dummy-package "x")))))
actual-value: #t
result: PASS
random seed for tests: 1522718344
warning: cannot run Web server for tests: Address already in use
warning: cannot run Web server for tests: Address already in use
warning: cannot run Web server for tests: Address already in use
warning: cannot run Web server for tests: Address already in use
warning: cannot run Web server for tests: Address already in use
warning: cannot run Web server for tests: Address already in use
warning: cannot run Web server for tests: Address already in use
warning: cannot run Web server for tests: Address already in use
warning: cannot run Web server for tests: Address already in use
warning: cannot run Web server for tests: Address already in use
FAIL: tests/derivations
=======================
test-name: parse & export
location: /home/pi/code/guix/tests/derivations.scm:87
source:
+ (test-assert
+ "parse & export"
+ (let* ((f (search-path %load-path "tests/test.drv"))
+ (b1 (call-with-input-file f get-bytevector-all))
+ (d1 (read-derivation (open-bytevector-input-port b1)))
+ (b2 (call-with-bytevector-output-port
+ (cut write-derivation d1 <>)))
+ (d2 (read-derivation (open-bytevector-input-port b2))))
+ (and (equal? b1 b2) (equal? d1 d2))))
actual-value: #t
result: PASS
test-name: add-to-store, flat
location: /home/pi/code/guix/tests/derivations.scm:98
source:
+ (test-assert
+ "add-to-store, flat"
+ (let* ((file (readlink*
+ (search-path
+ %load-path
+ "language/tree-il/spec.scm")))
+ (drv (add-to-store
+ %store
+ "flat-test"
+ #f
+ "sha256"
+ file)))
+ (and (eq? 'regular (stat:type (stat drv)))
+ (valid-path? %store drv)
+ (equal?
+ (call-with-input-file file get-bytevector-all)
+ (call-with-input-file drv get-bytevector-all)))))
actual-value: #t
result: PASS
test-name: add-to-store, recursive
location: /home/pi/code/guix/tests/derivations.scm:109
source:
+ (test-assert
+ "add-to-store, recursive"
+ (let* ((dir (dirname
+ (readlink*
+ (search-path
+ %load-path
+ "language/tree-il/spec.scm"))))
+ (drv (add-to-store
+ %store
+ "dir-tree-test"
+ #t
+ "sha256"
+ dir)))
+ (and (eq? 'directory (stat:type (stat drv)))
+ (valid-path? %store drv)
+ (equal?
+ (directory-contents dir)
+ (directory-contents drv)))))
actual-value: #t
result: PASS
test-name: derivation with no inputs
location: /home/pi/code/guix/tests/derivations.scm:119
source:
+ (test-assert
+ "derivation with no inputs"
+ (let* ((builder
+ (add-text-to-store
+ %store
+ "my-builder.sh"
+ "echo hello, world\n"
+ '()))
+ (drv (derivation
+ %store
+ "foo"
+ %bash
+ `("-e" ,builder)
+ #:env-vars
+ '(("HOME" . "/homeless")))))
+ (and (store-path? (derivation-file-name drv))
+ (valid-path? %store (derivation-file-name drv)))))
actual-value: #t
result: PASS
test-name: build derivation with 1 source
location: /home/pi/code/guix/tests/derivations.scm:129
source:
+ (test-assert
+ "build derivation with 1 source"
+ (let* ((builder
+ (add-text-to-store
+ %store
+ "my-builder.sh"
+ "echo hello, world > \"$out\"\n"
+ '()))
+ (drv (derivation
+ %store
+ "foo"
+ %bash
+ `(,builder)
+ #:env-vars
+ '(("HOME" . "/homeless")
+ ("zzz" . "Z!")
+ ("AAA" . "A!"))
+ #:inputs
+ `((,%bash) (,builder))))
+ (succeeded?
+ (build-derivations %store (list drv))))
+ (and succeeded?
+ (let ((path (derivation->output-path drv)))
+ (and (valid-path? %store path)
+ (string=?
+ (call-with-input-file path read-line)
+ "hello, world"))))))
actual-value: #t
result: PASS
test-name: derivation with local file as input
location: /home/pi/code/guix/tests/derivations.scm:147
source:
+ (test-assert
+ "derivation with local file as input"
+ (let* ((builder
+ (add-text-to-store
+ %store
+ "my-builder.sh"
+ "(while read line ; do echo \"$line\" ; done) < $in > $out"
+ '()))
+ (input (search-path %load-path "ice-9/boot-9.scm"))
+ (input*
+ (add-to-store
+ %store
+ (basename input)
+ #t
+ "sha256"
+ input))
+ (drv (derivation
+ %store
+ "derivation-with-input-file"
+ %bash
+ `(,builder)
+ #:env-vars
+ `(("in" unquote input*))
+ #:inputs
+ `((,%bash) (,builder) (,input)))))
+ (and (build-derivations %store (list drv))
+ (valid-path?
+ %store
+ (derivation->output-path drv)))))
actual-value: #t
result: PASS
test-name: derivation fails but keep going
location: /home/pi/code/guix/tests/derivations.scm:170
source:
+ (test-assert
+ "derivation fails but keep going"
+ (with-store
+ store
+ (let* ((d1 (derivation
+ %store
+ "fails"
+ %bash
+ `("-c" "false")
+ #:inputs
+ `((,%bash))))
+ (d2 (build-expression->derivation
+ %store
+ "sleep-then-succeed"
+ `(begin ,(random-text) (sleep 2) (mkdir %output)))))
+ (set-build-options
+ %store
+ #:use-substitutes?
+ #f
+ #:keep-going?
+ #t)
+ (guard (c ((nix-protocol-error? c)
+ (and (= 100 (nix-protocol-error-status c))
+ (string-contains
+ (nix-protocol-error-message c)
+ (derivation-file-name d1))
+ (not (valid-path? %store (derivation->output-path d1)))
+ (valid-path? %store (derivation->output-path d2)))))
+ (build-derivations %store (list d1 d2))
+ #f))))
random seed for tests: 1522718349
@ build-started /home/pi/code/guix/test-tmp/store/6pqrqlj1czpd520fl55sik363v44md26-fails.drv - armhf-linux /home/pi/code/guix/test-tmp/var/log/guix/drvs/6p//qrqlj1czpd520fl55sik363v44md26-fails.drv.bz2
builder for `/home/pi/code/guix/test-tmp/store/6pqrqlj1czpd520fl55sik363v44md26-fails.drv' failed with exit code 1
@ build-failed /home/pi/code/guix/test-tmp/store/6pqrqlj1czpd520fl55sik363v44md26-fails.drv - 1 builder for `/home/pi/code/guix/test-tmp/store/6pqrqlj1czpd520fl55sik363v44md26-fails.drv' failed with exit code 1
@ build-started /home/pi/code/guix/test-tmp/store/3m18lglr7w6l3nwnjy2dq7m72vb6jw8f-sleep-then-succeed.drv - armhf-linux /home/pi/code/guix/test-tmp/var/log/guix/drvs/3m//18lglr7w6l3nwnjy2dq7m72vb6jw8f-sleep-then-succeed.drv.bz2
@ build-succeeded /home/pi/code/guix/test-tmp/store/3m18lglr7w6l3nwnjy2dq7m72vb6jw8f-sleep-then-succeed.drv -
actual-value: #t
result: PASS
test-name: identical files are deduplicated
location: /home/pi/code/guix/tests/derivations.scm:197
source:
+ (test-assert
+ "identical files are deduplicated"
+ (let* ((build1
+ (add-text-to-store
+ %store
+ "one.sh"
+ "echo hello, world > \"$out\"\n"
+ '()))
+ (build2
+ (add-text-to-store
+ %store
+ "two.sh"
+ "# Hey!\necho hello, world > \"$out\"\n"
+ '()))
+ (drv1 (derivation
+ %store
+ "foo"
+ %bash
+ `(,build1)
+ #:inputs
+ `((,%bash) (,build1))))
+ (drv2 (derivation
+ %store
+ "bar"
+ %bash
+ `(,build2)
+ #:inputs
+ `((,%bash) (,build2)))))
+ (and (build-derivations %store (list drv1 drv2))
+ (let ((file1 (derivation->output-path drv1))
+ (file2 (derivation->output-path drv2)))
+ (and (valid-path? %store file1)
+ (valid-path? %store file2)
+ (string=?
+ (call-with-input-file file1 get-string-all)
+ "hello, world\n")
+ (= (stat:ino (lstat file1))
+ (stat:ino (lstat file2))))))))
actual-value: #t
result: PASS
test-name: built-in-builders
location: /home/pi/code/guix/tests/derivations.scm:219
source:
+ (test-equal
+ "built-in-builders"
+ '("download")
+ (built-in-builders %store))
expected-value: ("download")
actual-value: ("download")
result: PASS
test-name: unknown built-in builder
location: /home/pi/code/guix/tests/derivations.scm:223
source:
+ (test-assert
+ "unknown built-in builder"
+ (let ((drv (derivation
+ %store
+ "ohoh"
+ "builtin:does-not-exist"
+ '())))
+ (guard (c ((nix-protocol-error? c)
+ (string-contains
+ (nix-protocol-error-message c)
+ "failed")))
+ (build-derivations %store (list drv))
+ #f)))
@ build-started /home/pi/code/guix/test-tmp/store/0kb8p32y60qc0i4y9zq6y24rd93m0d6x-ohoh.drv - armhf-linux /home/pi/code/guix/test-tmp/var/log/guix/drvs/0k//b8p32y60qc0i4y9zq6y24rd93m0d6x-ohoh.drv.bz2
error: unsupported builtin function 'does-not-exist'
builder for `/home/pi/code/guix/test-tmp/store/0kb8p32y60qc0i4y9zq6y24rd93m0d6x-ohoh.drv' failed with exit code 1
@ build-failed /home/pi/code/guix/test-tmp/store/0kb8p32y60qc0i4y9zq6y24rd93m0d6x-ohoh.drv - 1 builder for `/home/pi/code/guix/test-tmp/store/0kb8p32y60qc0i4y9zq6y24rd93m0d6x-ohoh.drv' failed with exit code 1
actual-value: 87
result: PASS
test-name: 'download' built-in builder
location: /home/pi/code/guix/tests/derivations.scm:232
source:
+ (test-assert
+ "'download' built-in builder"
+ (let ((text (random-text)))
+ (with-http-server
+ 200
+ text
+ (let* ((drv (derivation
+ %store
+ "world"
+ "builtin:download"
+ '()
+ #:env-vars
+ `(("url" unquote (object->string (%local-url))))
+ #:hash-algo
+ 'sha256
+ #:hash
+ (sha256 (string->utf8 text)))))
+ (and (build-derivations %store (list drv))
+ (string=?
+ (call-with-input-file
+ (derivation->output-path drv)
+ get-string-all)
+ text))))))
@ build-started /home/pi/code/guix/test-tmp/store/z6z1l4k21jf2l9njh5x4qj2c93sjlwls-world.drv - armhf-linux /home/pi/code/guix/test-tmp/var/log/guix/drvs/z6//z1l4k21jf2l9njh5x4qj2c93sjlwls-world.drv.bz2
Starting download of /home/pi/code/guix/test-tmp/store/5dr6v3gsq3xjjj1mfw0waa4hlf6ilk8v-world
From http://localhost:10500/foo/bar...
ERROR: Wrong type to apply: #<syntax-transformer uri?>
failed to download "/home/pi/code/guix/test-tmp/store/5dr6v3gsq3xjjj1mfw0waa4hlf6ilk8v-world" from "http://localhost:10500/foo/bar"
builder for `/home/pi/code/guix/test-tmp/store/z6z1l4k21jf2l9njh5x4qj2c93sjlwls-world.drv' failed to produce output path `/home/pi/code/guix/test-tmp/store/5dr6v3gsq3xjjj1mfw0waa4hlf6ilk8v-world'
@ build-failed /home/pi/code/guix/test-tmp/store/z6z1l4k21jf2l9njh5x4qj2c93sjlwls-world.drv - 1 builder for `/home/pi/code/guix/test-tmp/store/z6z1l4k21jf2l9njh5x4qj2c93sjlwls-world.drv' failed to produce output path `/home/pi/code/guix/test-tmp/store/5dr6v3gsq3xjjj1mfw0waa4hlf6ilk8v-world'
actual-value: #f
actual-error:
+ (srfi-34
+ #<condition &nix-protocol-error [message: "build of `/home/pi/code/guix/test-tmp/store/z6z1l4k21jf2l9njh5x4qj2c93sjlwls-world.drv' failed" status: 1] 2441570>)
result: FAIL
test-name: 'download' built-in builder, invalid hash
location: /home/pi/code/guix/tests/derivations.scm:248
source:
+ (test-assert
+ "'download' built-in builder, invalid hash"
+ (with-http-server
+ 200
+ "hello, world!"
+ (let* ((drv (derivation
+ %store
+ "world"
+ "builtin:download"
+ '()
+ #:env-vars
+ `(("url" unquote (object->string (%local-url))))
+ #:hash-algo
+ 'sha256
+ #:hash
+ (sha256 (random-bytevector 100)))))
+ (guard (c ((nix-protocol-error? c)
+ (string-contains
+ (nix-protocol-error-message c)
+ "failed")))
+ (build-derivations %store (list drv))
+ #f))))
result: SKIP
test-name: 'download' built-in builder, not found
location: /home/pi/code/guix/tests/derivations.scm:263
source:
+ (test-assert
+ "'download' built-in builder, not found"
+ (with-http-server
+ 404
+ "not found"
+ (let* ((drv (derivation
+ %store
+ "will-never-be-found"
+ "builtin:download"
+ '()
+ #:env-vars
+ `(("url" unquote (object->string (%local-url))))
+ #:hash-algo
+ 'sha256
+ #:hash
+ (sha256 (random-bytevector 100)))))
+ (guard (c ((nix-protocol-error? c)
+ (string-contains
+ (nix-protocol-error-message (pk c))
+ "failed")))
+ (build-derivations %store (list drv))
+ #f))))
result: SKIP
test-name: 'download' built-in builder, not fixed-output
location: /home/pi/code/guix/tests/derivations.scm:276
source:
+ (test-assert
+ "'download' built-in builder, not fixed-output"
+ (let* ((source (add-text-to-store %store "hello" "hi!"))
+ (url (string-append "file://" source))
+ (drv (derivation
+ %store
+ "world"
+ "builtin:download"
+ '()
+ #:env-vars
+ `(("url" unquote (object->string url))))))
+ (guard (c ((nix-protocol-error? c)
+ (string-contains
+ (nix-protocol-error-message c)
+ "failed")))
+ (build-derivations %store (list drv))
+ #f)))
warning: cannot run Web server for tests: Address already in use
warning: cannot run Web server for tests: Address already in use
@ build-started /home/pi/code/guix/test-tmp/store/8d5b6vmr1yqp0rrwvs0kimbvi3v7wp1h-world.drv - armhf-linux /home/pi/code/guix/test-tmp/var/log/guix/drvs/8d//5b6vmr1yqp0rrwvs0kimbvi3v7wp1h-world.drv.bz2
guix perform-download: error: /home/pi/code/guix/test-tmp/store/8d5b6vmr1yqp0rrwvs0kimbvi3v7wp1h-world.drv is not a fixed-output derivation
builder for `/home/pi/code/guix/test-tmp/store/8d5b6vmr1yqp0rrwvs0kimbvi3v7wp1h-world.drv' failed with exit code 1
@ build-failed /home/pi/code/guix/test-tmp/store/8d5b6vmr1yqp0rrwvs0kimbvi3v7wp1h-world.drv - 1 builder for `/home/pi/code/guix/test-tmp/store/8d5b6vmr1yqp0rrwvs0kimbvi3v7wp1h-world.drv' failed with exit code 1
actual-value: 88
result: PASS
test-name: 'download' built-in builder, check mode
location: /home/pi/code/guix/tests/derivations.scm:289
source:
+ (test-assert
+ "'download' built-in builder, check mode"
+ (let* ((text (random-text))
+ (drv (derivation
+ %store
+ "world"
+ "builtin:download"
+ '()
+ #:env-vars
+ `(("url" unquote (object->string (%local-url))))
+ #:hash-algo
+ 'sha256
+ #:hash
+ (sha256 (string->utf8 text)))))
+ (and (with-http-server
+ 200
+ text
+ (build-derivations %store (list drv)))
+ (with-http-server
+ 200
+ text
+ (build-derivations
+ %store
+ (list drv)
+ (build-mode check)))
+ (string=?
+ (call-with-input-file
+ (derivation->output-path drv)
+ get-string-all)
+ text))))
result: SKIP
test-name: derivation-name
location: /home/pi/code/guix/tests/derivations.scm:308
source:
+ (test-equal
+ "derivation-name"
+ "foo-0.0"
+ (let ((drv (derivation %store "foo-0.0" %bash '())))
+ (derivation-name drv)))
expected-value: "foo-0.0"
actual-value: "foo-0.0"
result: PASS
test-name: derivation-output-names
location: /home/pi/code/guix/tests/derivations.scm:313
source:
+ (test-equal
+ "derivation-output-names"
+ '(("out") ("bar" "chbouib"))
+ (let ((drv1 (derivation %store "foo-0.0" %bash '()))
+ (drv2 (derivation
+ %store
+ "foo-0.0"
+ %bash
+ '()
+ #:outputs
+ '("bar" "chbouib"))))
+ (list (derivation-output-names drv1)
+ (derivation-output-names drv2))))
expected-value: (("out") ("bar" "chbouib"))
actual-value: (("out") ("bar" "chbouib"))
result: PASS
test-name: offloadable-derivation?
location: /home/pi/code/guix/tests/derivations.scm:321
source:
+ (test-assert
+ "offloadable-derivation?"
+ (and (offloadable-derivation?
+ (derivation %store "foo" %bash '()))
+ (offloadable-derivation?
+ (derivation
+ %store
+ "foo"
+ %bash
+ '()
+ #:substitutable?
+ #f))
+ (not (offloadable-derivation?
+ (derivation
+ %store
+ "foo"
+ %bash
+ '()
+ #:local-build?
+ #t)))))
actual-value: #t
result: PASS
test-name: substitutable-derivation?
location: /home/pi/code/guix/tests/derivations.scm:330
source:
+ (test-assert
+ "substitutable-derivation?"
+ (and (substitutable-derivation?
+ (derivation %store "foo" %bash '()))
+ (substitutable-derivation?
+ (derivation
+ %store
+ "foo"
+ %bash
+ '()
+ #:local-build?
+ #t))
+ (not (substitutable-derivation?
+ (derivation
+ %store
+ "foo"
+ %bash
+ '()
+ #:substitutable?
+ #f)))))
actual-value: #t
result: PASS
test-name: fixed-output-derivation?
location: /home/pi/code/guix/tests/derivations.scm:339
source:
+ (test-assert
+ "fixed-output-derivation?"
+ (let* ((builder
+ (add-text-to-store
+ %store
+ "my-fixed-builder.sh"
+ "echo -n hello > $out"
+ '()))
+ (hash (sha256 (string->utf8 "hello")))
+ (drv (derivation
+ %store
+ "fixed"
+ %bash
+ `(,builder)
+ #:inputs
+ `((,builder))
+ #:hash
+ hash
+ #:hash-algo
+ 'sha256)))
+ (fixed-output-derivation? drv)))
actual-value: #t
result: PASS
test-name: fixed-output derivation
location: /home/pi/code/guix/tests/derivations.scm:349
source:
+ (test-assert
+ "fixed-output derivation"
+ (let* ((builder
+ (add-text-to-store
+ %store
+ "my-fixed-builder.sh"
+ "echo -n hello > $out"
+ '()))
+ (hash (sha256 (string->utf8 "hello")))
+ (drv (derivation
+ %store
+ "fixed"
+ %bash
+ `(,builder)
+ #:inputs
+ `((,builder))
+ #:hash
+ hash
+ #:hash-algo
+ 'sha256))
+ (succeeded?
+ (build-derivations %store (list drv))))
+ (and succeeded?
+ (let ((p (derivation->output-path drv)))
+ (and (equal?
+ (string->utf8 "hello")
+ (call-with-input-file p get-bytevector-all))
+ (bytevector? (query-path-hash %store p)))))))
actual-value: #t
result: PASS
test-name: fixed-output derivation: output paths are equal
location: /home/pi/code/guix/tests/derivations.scm:364
source:
+ (test-assert
+ "fixed-output derivation: output paths are equal"
+ (let* ((builder1
+ (add-text-to-store
+ %store
+ "fixed-builder1.sh"
+ "echo -n hello > $out"
+ '()))
+ (builder2
+ (add-text-to-store
+ %store
+ "fixed-builder2.sh"
+ "echo hey; echo -n hello > $out"
+ '()))
+ (hash (sha256 (string->utf8 "hello")))
+ (drv1 (derivation
+ %store
+ "fixed"
+ %bash
+ `(,builder1)
+ #:hash
+ hash
+ #:hash-algo
+ 'sha256))
+ (drv2 (derivation
+ %store
+ "fixed"
+ %bash
+ `(,builder2)
+ #:hash
+ hash
+ #:hash-algo
+ 'sha256))
+ (succeeded?
+ (build-derivations %store (list drv1 drv2))))
+ (and succeeded?
+ (equal?
+ (derivation->output-path drv1)
+ (derivation->output-path drv2)))))
actual-value: #t
result: PASS
test-name: fixed-output derivation, recursive
location: /home/pi/code/guix/tests/derivations.scm:381
source:
+ (test-assert
+ "fixed-output derivation, recursive"
+ (let* ((builder
+ (add-text-to-store
+ %store
+ "my-fixed-builder.sh"
+ "echo -n hello > $out"
+ '()))
+ (hash (sha256 (string->utf8 "hello")))
+ (drv (derivation
+ %store
+ "fixed-rec"
+ %bash
+ `(,builder)
+ #:inputs
+ `((,builder))
+ #:hash
+ (base32
+ "0sg9f58l1jj88w6pdrfdpj5x9b1zrwszk84j81zvby36q9whhhqa")
+ #:hash-algo
+ 'sha256
+ #:recursive?
+ #t))
+ (succeeded?
+ (build-derivations %store (list drv))))
+ (and succeeded?
+ (let ((p (derivation->output-path drv)))
+ (and (equal?
+ (string->utf8 "hello")
+ (call-with-input-file p get-bytevector-all))
+ (bytevector? (query-path-hash %store p)))))))
actual-value: #t
result: PASS
test-name: derivation with a fixed-output input
location: /home/pi/code/guix/tests/derivations.scm:398
source:
+ (test-assert
+ "derivation with a fixed-output input"
+ (let* ((builder1
+ (add-text-to-store
+ %store
+ "fixed-builder1.sh"
+ "echo -n hello > $out"
+ '()))
+ (builder2
+ (add-text-to-store
+ %store
+ "fixed-builder2.sh"
+ "echo hey; echo -n hello > $out"
+ '()))
+ (hash (sha256 (string->utf8 "hello")))
+ (fixed1
+ (derivation
+ %store
+ "fixed"
+ %bash
+ `(,builder1)
+ #:hash
+ hash
+ #:hash-algo
+ 'sha256))
+ (fixed2
+ (derivation
+ %store
+ "fixed"
+ %bash
+ `(,builder2)
+ #:hash
+ hash
+ #:hash-algo
+ 'sha256))
+ (fixed-out (derivation->output-path fixed1))
+ (builder3
+ (add-text-to-store
+ %store
+ "final-builder.sh"
+ "echo $in ; (read -u 3 c; echo $c) 3< $in > $out"
+ '()))
+ (final1
+ (derivation
+ %store
+ "final"
+ %bash
+ `(,builder3)
+ #:env-vars
+ `(("in" unquote fixed-out))
+ #:inputs
+ `((,%bash) (,builder3) (,fixed1))))
+ (final2
+ (derivation
+ %store
+ "final"
+ %bash
+ `(,builder3)
+ #:env-vars
+ `(("in" unquote fixed-out))
+ #:inputs
+ `((,%bash) (,builder3) (,fixed2))))
+ (succeeded?
+ (build-derivations %store (list final1 final2))))
+ (and succeeded?
+ (equal?
+ (derivation->output-path final1)
+ (derivation->output-path final2)))))
actual-value: #t
result: PASS
test-name: multiple-output derivation
location: /home/pi/code/guix/tests/derivations.scm:432
source:
+ (test-assert
+ "multiple-output derivation"
+ (let* ((builder
+ (add-text-to-store
+ %store
+ "my-fixed-builder.sh"
+ "echo one > $out ; echo two > $second"
+ '()))
+ (drv (derivation
+ %store
+ "fixed"
+ %bash
+ `(,builder)
+ #:env-vars
+ '(("HOME" . "/homeless")
+ ("zzz" . "Z!")
+ ("AAA" . "A!"))
+ #:inputs
+ `((,%bash) (,builder))
+ #:outputs
+ '("out" "second")))
+ (succeeded?
+ (build-derivations %store (list drv))))
+ (and succeeded?
+ (let ((one (derivation->output-path drv "out"))
+ (two (derivation->output-path drv "second")))
+ (and (lset= equal?
+ (derivation->output-paths drv)
+ `(("out" unquote one) ("second" unquote two)))
+ (eq? 'one (call-with-input-file one read))
+ (eq? 'two (call-with-input-file two read)))))))
actual-value: #t
result: PASS
test-name: multiple-output derivation, non-alphabetic order
location: /home/pi/code/guix/tests/derivations.scm:453
source:
+ (test-assert
+ "multiple-output derivation, non-alphabetic order"
+ (let* ((builder
+ (add-text-to-store
+ %store
+ "my-fixed-builder.sh"
+ "echo one > $out ; echo two > $AAA"
+ '()))
+ (drv (derivation
+ %store
+ "fixed"
+ %bash
+ `(,builder)
+ #:inputs
+ `((,%bash) (,builder))
+ #:outputs
+ '("out" "AAA")))
+ (succeeded?
+ (build-derivations %store (list drv))))
+ (and succeeded?
+ (let ((one (derivation->output-path drv "out"))
+ (two (derivation->output-path drv "AAA")))
+ (and (eq? 'one (call-with-input-file one read))
+ (eq? 'two (call-with-input-file two read)))))))
actual-value: #t
result: PASS
test-name: read-derivation vs. derivation
location: /home/pi/code/guix/tests/derivations.scm:470
source:
+ (test-assert
+ "read-derivation vs. derivation"
+ (let* ((sources
+ (unfold
+ (cut >= <> 10)
+ (lambda (n)
+ (add-text-to-store
+ %store
+ (format #f "input~a" n)
+ (random-text)))
+ #{1+}#
+ 0))
+ (inputs
+ (map (lambda (file)
+ (derivation
+ %store
+ "derivation-input"
+ %bash
+ '()
+ #:inputs
+ `((,%bash) (,file))))
+ sources))
+ (builder
+ (add-text-to-store
+ %store
+ "builder.sh"
+ "echo one > $one ; echo two > $two"
+ '()))
+ (drv (derivation
+ %store
+ "derivation"
+ %bash
+ `(,builder)
+ #:inputs
+ `((,%bash)
+ (,builder)
+ ,@(map list (append sources inputs)))
+ #:outputs
+ '("two" "one")))
+ (drv* (call-with-input-file
+ (derivation-file-name drv)
+ read-derivation)))
+ (equal? drv* drv)))
actual-value: #t
result: PASS
test-name: multiple-output derivation, derivation-path->output-path
location: /home/pi/code/guix/tests/derivations.scm:497
source:
+ (test-assert
+ "multiple-output derivation, derivation-path->output-path"
+ (let* ((builder
+ (add-text-to-store
+ %store
+ "builder.sh"
+ "echo one > $out ; echo two > $second"
+ '()))
+ (drv (derivation
+ %store
+ "multiple"
+ %bash
+ `(,builder)
+ #:outputs
+ '("out" "second")))
+ (drv-file (derivation-file-name drv))
+ (one (derivation->output-path drv "out"))
+ (two (derivation->output-path drv "second"))
+ (first (derivation-path->output-path drv-file "out"))
+ (second
+ (derivation-path->output-path drv-file "second")))
+ (and (not (string=? one two))
+ (string-suffix? "-second" two)
+ (string=? first one)
+ (string=? second two))))
actual-value: #t
result: PASS
test-name: user of multiple-output derivation
location: /home/pi/code/guix/tests/derivations.scm:514
source:
+ (test-assert
+ "user of multiple-output derivation"
+ (let* ((builder1
+ (add-text-to-store
+ %store
+ "my-mo-builder.sh"
+ "echo one > $out ; echo two > $two"
+ '()))
+ (mdrv (derivation
+ %store
+ "multiple-output"
+ %bash
+ `(,builder1)
+ #:inputs
+ `((,%bash) (,builder1))
+ #:outputs
+ '("out" "two")))
+ (builder2
+ (add-text-to-store
+ %store
+ "my-mo-user-builder.sh"
+ "read x < $one;\n read y < $two;\n echo \"($x $y)\" > $out"
+ '()))
+ (udrv (derivation
+ %store
+ "multiple-output-user"
+ %bash
+ `(,builder2)
+ #:env-vars
+ `(("one"
+ unquote
+ (derivation->output-path mdrv "out"))
+ ("two"
+ unquote
+ (derivation->output-path mdrv "two")))
+ #:inputs
+ `((,%bash) (,builder2) (,mdrv) (,mdrv "two")))))
+ (and (build-derivations %store (list (pk 'udrv udrv)))
+ (let ((p (derivation->output-path udrv)))
+ (and (valid-path? %store p)
+ (equal? '(one two) (call-with-input-file p read)))))))
;;; (udrv #<derivation /home/pi/code/guix/test-tmp/store/4ih14p4zwzpsc6jni7h4fxzfqgc3f3ww-multiple-output-user.drv => /home/pi/code/guix/test-tmp/store/dzn5q2yn0z69wa6qkhpxfbjsqaa7hawc-multiple-output-user 24432a8>)
actual-value: #t
result: PASS
test-name: derivation with #:references-graphs
location: /home/pi/code/guix/tests/derivations.scm:547
source:
+ (test-assert
+ "derivation with #:references-graphs"
+ (let* ((input1
+ (add-text-to-store
+ %store
+ "foo"
+ "hello"
+ (list %bash)))
+ (input2
+ (add-text-to-store
+ %store
+ "bar"
+ (number->string (random 7777))
+ (list input1)))
+ (builder
+ (add-text-to-store
+ %store
+ "build-graph"
+ (format
+ #f
+ "\n~a $out\n (while read l ; do echo $l ; done) < bash > $out/bash\n (while read l ; do echo $l ; done) < input1 > $out/input1\n (while read l ; do echo $l ; done) < input2 > $out/input2"
+ %mkdir)
+ (list %mkdir)))
+ (drv (derivation
+ %store
+ "closure-graphs"
+ %bash
+ `(,builder)
+ #:references-graphs
+ `(("bash" unquote %bash)
+ ("input1" unquote input1)
+ ("input2" unquote input2))
+ #:inputs
+ `((,%bash) (,builder))))
+ (out (derivation->output-path drv)))
+ (define (deps path . deps)
+ (let ((count (length deps)))
+ (string-append
+ path
+ "\n\n"
+ (number->string count)
+ "\n"
+ (string-join (sort deps string<?) "\n")
+ (if (zero? count) "" "\n"))))
+ (and (build-derivations %store (list drv))
+ (equal?
+ (directory-contents out get-string-all)
+ `(("/bash" unquote (string-append %bash "\n\n0\n"))
+ ("/input1"
+ unquote
+ (if (string>? input1 %bash)
+ (string-append (deps %bash) (deps input1 %bash))
+ (string-append (deps input1 %bash) (deps %bash))))
+ ("/input2"
+ unquote
+ (string-concatenate
+ (map cdr
+ (sort (map (lambda (p d) (cons p (apply deps p d)))
+ (list %bash input1 input2)
+ (list '() (list %bash) (list input1)))
+ (lambda (x y)
+ (match x
+ ((p1 . _)
+ (match y
+ ((p2 . _)
+ (string<? p1 p2)))))))))))))))
actual-value: #t
result: PASS
test-name: derivation #:allowed-references, ok
location: /home/pi/code/guix/tests/derivations.scm:597
source:
+ (test-assert
+ "derivation #:allowed-references, ok"
+ (let ((drv (derivation
+ %store
+ "allowed"
+ %bash
+ '("-c" "echo hello > $out")
+ #:inputs
+ `((,%bash))
+ #:allowed-references
+ '())))
+ (build-derivations %store (list drv))))
actual-value: #t
result: PASS
test-name: derivation #:allowed-references, not allowed
location: /home/pi/code/guix/tests/derivations.scm:604
source:
+ (test-assert
+ "derivation #:allowed-references, not allowed"
+ (let* ((txt (add-text-to-store %store "foo" "Hello, world."))
+ (drv (derivation
+ %store
+ "disallowed"
+ %bash
+ `("-c" ,(string-append "echo " txt "> $out"))
+ #:inputs
+ `((,%bash) (,txt))
+ #:allowed-references
+ '())))
+ (guard (c ((nix-protocol-error? c) #t))
+ (build-derivations %store (list drv))
+ #f)))
warning: cannot run Web server for tests: Address already in use
@ build-started /home/pi/code/guix/test-tmp/store/m0igf1s1qmhal7zpgbgw6d2jcr828hjv-disallowed.drv - armhf-linux /home/pi/code/guix/test-tmp/var/log/guix/drvs/m0//igf1s1qmhal7zpgbgw6d2jcr828hjv-disallowed.drv.bz2
output (`/home/pi/code/guix/test-tmp/store/fadh4nxkr446yhscfa8kj53723chzjrm-disallowed') is not allowed to refer to path `/home/pi/code/guix/test-tmp/store/6byj5s2xyj3c6q4y0b0riyq1n6q14ph7-foo'
@ build-failed /home/pi/code/guix/test-tmp/store/m0igf1s1qmhal7zpgbgw6d2jcr828hjv-disallowed.drv - 1 output (`/home/pi/code/guix/test-tmp/store/fadh4nxkr446yhscfa8kj53723chzjrm-disallowed') is not allowed to refer to path `/home/pi/code/guix/test-tmp/store/6byj5s2xyj3c6q4y0b0riyq1n6q14ph7-foo'
actual-value: #t
result: PASS
test-name: derivation #:allowed-references, self allowed
location: /home/pi/code/guix/tests/derivations.scm:616
source:
+ (test-assert
+ "derivation #:allowed-references, self allowed"
+ (let ((drv (derivation
+ %store
+ "allowed"
+ %bash
+ '("-c" "echo $out > $out")
+ #:inputs
+ `((,%bash))
+ #:allowed-references
+ '("out"))))
+ (build-derivations %store (list drv))))
actual-value: #t
result: PASS
test-name: derivation #:allowed-references, self not allowed
location: /home/pi/code/guix/tests/derivations.scm:623
source:
+ (test-assert
+ "derivation #:allowed-references, self not allowed"
+ (let ((drv (derivation
+ %store
+ "disallowed"
+ %bash
+ `("-c" ,"echo $out > $out")
+ #:inputs
+ `((,%bash))
+ #:allowed-references
+ '())))
+ (guard (c ((nix-protocol-error? c) #t))
+ (build-derivations %store (list drv))
+ #f)))
@ build-started /home/pi/code/guix/test-tmp/store/vgka2l64ayc5b2qix49r8rpdiii94kdw-disallowed.drv - armhf-linux /home/pi/code/guix/test-tmp/var/log/guix/drvs/vg//ka2l64ayc5b2qix49r8rpdiii94kdw-disallowed.drv.bz2
output (`/home/pi/code/guix/test-tmp/store/v22gs9caissih3jylphx69zcqcxx87hb-disallowed') is not allowed to refer to path `/home/pi/code/guix/test-tmp/store/v22gs9caissih3jylphx69zcqcxx87hb-disallowed'
@ build-failed /home/pi/code/guix/test-tmp/store/vgka2l64ayc5b2qix49r8rpdiii94kdw-disallowed.drv - 1 output (`/home/pi/code/guix/test-tmp/store/v22gs9caissih3jylphx69zcqcxx87hb-disallowed') is not allowed to refer to path `/home/pi/code/guix/test-tmp/store/v22gs9caissih3jylphx69zcqcxx87hb-disallowed'
actual-value: #t
result: PASS
test-name: derivation #:disallowed-references, ok
location: /home/pi/code/guix/tests/derivations.scm:634
source:
+ (test-assert
+ "derivation #:disallowed-references, ok"
+ (let ((drv (derivation
+ %store
+ "disallowed"
+ %bash
+ '("-c" "echo hello > $out")
+ #:inputs
+ `((,%bash))
+ #:disallowed-references
+ '("out"))))
+ (build-derivations %store (list drv))))
actual-value: #t
result: PASS
test-name: derivation #:disallowed-references, not ok
location: /home/pi/code/guix/tests/derivations.scm:641
source:
+ (test-assert
+ "derivation #:disallowed-references, not ok"
+ (let* ((txt (add-text-to-store %store "foo" "Hello, world."))
+ (drv (derivation
+ %store
+ "disdisallowed"
+ %bash
+ `("-c" ,(string-append "echo " txt "> $out"))
+ #:inputs
+ `((,%bash) (,txt))
+ #:disallowed-references
+ (list txt))))
+ (guard (c ((nix-protocol-error? c) #t))
+ (build-derivations %store (list drv))
+ #f)))
@ build-started /home/pi/code/guix/test-tmp/store/aanl8rvqj0dgvc2rhdaak6hx4fs01ynh-disdisallowed.drv - armhf-linux /home/pi/code/guix/test-tmp/var/log/guix/drvs/aa//nl8rvqj0dgvc2rhdaak6hx4fs01ynh-disdisallowed.drv.bz2
output (`/home/pi/code/guix/test-tmp/store/nc22rq4s13hm6km2kzgs7sdacvgwfjdl-disdisallowed') is not allowed to refer to path `/home/pi/code/guix/test-tmp/store/6byj5s2xyj3c6q4y0b0riyq1n6q14ph7-foo'
@ build-failed /home/pi/code/guix/test-tmp/store/aanl8rvqj0dgvc2rhdaak6hx4fs01ynh-disdisallowed.drv - 1 output (`/home/pi/code/guix/test-tmp/store/nc22rq4s13hm6km2kzgs7sdacvgwfjdl-disdisallowed') is not allowed to refer to path `/home/pi/code/guix/test-tmp/store/6byj5s2xyj3c6q4y0b0riyq1n6q14ph7-foo'
actual-value: #t
result: PASS
test-name: derivation #:leaked-env-vars
location: /home/pi/code/guix/tests/derivations.scm:656
source:
+ (test-equal
+ "derivation #:leaked-env-vars"
+ (getenv "NIX_STATE_DIR")
+ (let* ((value (getenv "NIX_STATE_DIR"))
+ (drv (derivation
+ %store
+ "leaked-env-vars"
+ %bash
+ '("-c" "echo -n $NIX_STATE_DIR > $out")
+ #:hash
+ (sha256 (string->utf8 value))
+ #:hash-algo
+ 'sha256
+ #:inputs
+ `((,%bash))
+ #:leaked-env-vars
+ '("NIX_STATE_DIR"))))
+ (and (build-derivations %store (list drv))
+ (call-with-input-file
+ (derivation->output-path drv)
+ get-string-all))))
@ build-started /home/pi/code/guix/test-tmp/store/lqprqh1anjf7szgwybys4sskp03whhf0-leaked-env-vars.drv - armhf-linux /home/pi/code/guix/test-tmp/var/log/guix/drvs/lq//prqh1anjf7szgwybys4sskp03whhf0-leaked-env-vars.drv.bz2
@ build-succeeded /home/pi/code/guix/test-tmp/store/lqprqh1anjf7szgwybys4sskp03whhf0-leaked-env-vars.drv -
expected-value: "/home/pi/code/guix/test-tmp/var/17552"
actual-value: "/home/pi/code/guix/test-tmp/var/17552"
result: PASS
test-name: build derivation with coreutils
location: /home/pi/code/guix/tests/derivations.scm:677
source:
+ (test-assert
+ "build derivation with coreutils"
+ (let* ((builder
+ (add-text-to-store
+ %store
+ "build-with-coreutils.sh"
+ "echo $PATH ; mkdir --version ; mkdir $out ; touch $out/good"
+ '()))
+ (drv (derivation
+ %store
+ "foo"
+ %bash
+ `(,builder)
+ #:env-vars
+ `(("PATH"
+ unquote
+ (string-append
+ (derivation->output-path %coreutils)
+ "/bin")))
+ #:inputs
+ `((,builder) (,%coreutils))))
+ (succeeded?
+ (build-derivations %store (list drv))))
+ (and succeeded?
+ (let ((p (derivation->output-path drv)))
+ (and (valid-path? %store p)
+ (file-exists? (string-append p "/good")))))))
actual-value: #t
result: PASS
test-name: build-expression->derivation and invalid module name
location: /home/pi/code/guix/tests/derivations.scm:700
source:
+ (test-equal
+ "build-expression->derivation and invalid module name"
+ '(file-search-error
+ "guix/module/that/does/not/exist.scm")
+ (guard (c ((file-search-error? c)
+ (list 'file-search-error
+ (file-search-error-file-name c))))
+ (build-expression->derivation
+ %store
+ "foo"
+ #t
+ #:modules
+ '((guix module that does not exist)))))
expected-value: (file-search-error "guix/module/that/does/not/exist.scm")
actual-value: (file-search-error "guix/module/that/does/not/exist.scm")
result: PASS
test-name: build-expression->derivation and builder encoding
location: /home/pi/code/guix/tests/derivations.scm:709
source:
+ (test-equal
+ "build-expression->derivation and builder encoding"
+ '("UTF-8" #t)
+ (let* ((exp '(λ (α) (+ α 1)))
+ (drv (build-expression->derivation %store "foo" exp)))
+ (match (derivation-builder-arguments drv)
+ ((... builder)
+ (with-fluids
+ ((%default-port-encoding "UTF-8"))
+ (call-with-input-file
+ builder
+ (lambda (port)
+ (list (port-encoding port)
+ (->bool
+ (string-contains
+ (get-string-all port)
+ "(λ (α) (+ α 1))"))))))))))
expected-value: ("UTF-8" #t)
actual-value: ("UTF-8" #t)
result: PASS
test-name: build-expression->derivation and derivation-prerequisites
location: /home/pi/code/guix/tests/derivations.scm:723
source:
+ (test-assert
+ "build-expression->derivation and derivation-prerequisites"
+ (let ((drv (build-expression->derivation %store "fail" #f)))
+ (any (match-lambda
+ (($ <derivation-input> path)
+ (string=?
+ path
+ (derivation-file-name (%guile-for-build)))))
+ (derivation-prerequisites drv))))
actual-value: #t
result: PASS
test-name: derivation-prerequisites and valid-derivation-input?
location: /home/pi/code/guix/tests/derivations.scm:730
source:
+ (test-assert
+ "derivation-prerequisites and valid-derivation-input?"
+ (let* ((a (build-expression->derivation
+ %store
+ "a"
+ '(mkdir %output)))
+ (b (build-expression->derivation
+ %store
+ "b"
+ `(list ,(random-text))))
+ (c (build-expression->derivation
+ %store
+ "c"
+ `(mkdir %output)
+ #:inputs
+ `(("a" ,a) ("b" ,b)))))
+ (build-derivations
+ %store
+ (list a
+ (package-derivation %store %bootstrap-guile)))
+ (match (derivation-prerequisites
+ c
+ (cut valid-derivation-input? %store <>))
+ ((($ <derivation-input> file ("out")))
+ (string=? file (derivation-file-name b)))
+ (x (pk 'fail x #f)))))
actual-value: #t
result: PASS
test-name: build-expression->derivation without inputs
location: /home/pi/code/guix/tests/derivations.scm:748
source:
+ (test-assert
+ "build-expression->derivation without inputs"
+ (let* ((builder
+ '(begin
+ (mkdir %output)
+ (call-with-output-file
+ (string-append %output "/test")
+ (lambda (p) (display '(hello guix) p)))))
+ (drv (build-expression->derivation
+ %store
+ "goo"
+ builder))
+ (succeeded?
+ (build-derivations %store (list drv))))
+ (and succeeded?
+ (let ((p (derivation->output-path drv)))
+ (equal?
+ '(hello guix)
+ (call-with-input-file
+ (string-append p "/test")
+ read))))))
actual-value: #t
result: PASS
test-name: build-expression->derivation and max-silent-time
location: /home/pi/code/guix/tests/derivations.scm:761
source:
+ (test-assert
+ "build-expression->derivation and max-silent-time"
+ (let* ((store (let ((s (open-connection)))
+ (set-build-options s #:max-silent-time 1)
+ s))
+ (builder '(begin (sleep 100) (mkdir %output) #t))
+ (drv (build-expression->derivation
+ store
+ "silent"
+ builder))
+ (out-path (derivation->output-path drv)))
+ (guard (c ((nix-protocol-error? c)
+ (and (string-contains
+ (nix-protocol-error-message c)
+ "failed")
+ (not (valid-path? store out-path)))))
+ (build-derivations store (list drv))
+ #f)))
substitute: warning: authentication and authorization of substitutes disabled!
substitute: guix substitute: warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable
@ build-started /home/pi/code/guix/test-tmp/store/01qccag60yg0jhxwcsgb12nxdp4fq93h-silent.drv - armhf-linux /home/pi/code/guix/test-tmp/var/log/guix/drvs/01//qccag60yg0jhxwcsgb12nxdp4fq93h-silent.drv.bz2
building of `/home/pi/code/guix/test-tmp/store/01qccag60yg0jhxwcsgb12nxdp4fq93h-silent.drv' timed out after 1 seconds of silence
@ build-failed /home/pi/code/guix/test-tmp/store/01qccag60yg0jhxwcsgb12nxdp4fq93h-silent.drv - timeout
killing process 17674
actual-value: #t
result: PASS
test-name: build-expression->derivation and timeout
location: /home/pi/code/guix/tests/derivations.scm:775
source:
+ (test-assert
+ "build-expression->derivation and timeout"
+ (let* ((store (let ((s (open-connection)))
+ (set-build-options s #:timeout 1)
+ s))
+ (builder '(begin (sleep 100) (mkdir %output) #t))
+ (drv (build-expression->derivation
+ store
+ "slow"
+ builder))
+ (out-path (derivation->output-path drv)))
+ (guard (c ((nix-protocol-error? c)
+ (and (string-contains
+ (nix-protocol-error-message c)
+ "failed")
+ (not (valid-path? store out-path)))))
+ (build-derivations store (list drv))
+ #f)))
substitute: warning: authentication and authorization of substitutes disabled!
substitute: guix substitute: warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable
@ build-started /home/pi/code/guix/test-tmp/store/ysys47zaaz8iqhsaq4y4q1sx8k4qs338-slow.drv - armhf-linux /home/pi/code/guix/test-tmp/var/log/guix/drvs/ys//ys47zaaz8iqhsaq4y4q1sx8k4qs338-slow.drv.bz2
building of `/home/pi/code/guix/test-tmp/store/ysys47zaaz8iqhsaq4y4q1sx8k4qs338-slow.drv' timed out after 1 seconds
@ build-failed /home/pi/code/guix/test-tmp/store/ysys47zaaz8iqhsaq4y4q1sx8k4qs338-slow.drv - timeout
killing process 17684
actual-value: #t
result: PASS
test-name: build-expression->derivation and derivation-prerequisites-to-build
location: /home/pi/code/guix/tests/derivations.scm:789
source:
+ (test-assert
+ "build-expression->derivation and derivation-prerequisites-to-build"
+ (let ((drv (build-expression->derivation %store "fail" #f)))
+ (null? (derivation-prerequisites-to-build %store drv))))
actual-value: #t
result: PASS
test-name: derivation-prerequisites-to-build when outputs already present
location: /home/pi/code/guix/tests/derivations.scm:795
source:
+ (test-assert
+ "derivation-prerequisites-to-build when outputs already present"
+ (let* ((builder '(begin (mkdir %output) #t))
+ (input-drv
+ (build-expression->derivation
+ %store
+ "input"
+ builder))
+ (input-path
+ (derivation-output-path
+ (assoc-ref (derivation-outputs input-drv) "out")))
+ (drv (build-expression->derivation
+ %store
+ "something"
+ builder
+ #:inputs
+ `(("i" ,input-drv))))
+ (output (derivation->output-path drv)))
+ (when (valid-path? %store input-path)
+ (delete-paths %store (list input-path)))
+ (when (valid-path? %store output)
+ (delete-paths %store (list output)))
+ (and (equal?
+ (map derivation-input-path
+ (derivation-prerequisites-to-build %store drv))
+ (list (derivation-file-name input-drv)))
+ (build-derivations %store (list drv))
+ (delete-paths %store (list input-path))
+ (not (valid-path? %store input-path))
+ (null? (derivation-prerequisites-to-build %store drv)))))
finding garbage collector roots...
removing stale temporary roots file `/home/pi/code/guix/test-tmp/var/17552/temproots/17616'
deleting unused links...
@ build-started /home/pi/code/guix/test-tmp/store/zrjxcv82fwscs1xdmgi68b2x68w7yarf-input.drv - armhf-linux /home/pi/code/guix/test-tmp/var/log/guix/drvs/zr//jxcv82fwscs1xdmgi68b2x68w7yarf-input.drv.bz2
@ build-succeeded /home/pi/code/guix/test-tmp/store/zrjxcv82fwscs1xdmgi68b2x68w7yarf-input.drv -
@ build-started /home/pi/code/guix/test-tmp/store/pklvp4i7as5ssvnxj629m590mz9bk9h6-something.drv - armhf-linux /home/pi/code/guix/test-tmp/var/log/guix/drvs/pk//lvp4i7as5ssvnxj629m590mz9bk9h6-something.drv.bz2
@ build-succeeded /home/pi/code/guix/test-tmp/store/pklvp4i7as5ssvnxj629m590mz9bk9h6-something.drv -
finding garbage collector roots...
deleting unused links...
actual-value: #t
result: PASS
test-name: derivation-prerequisites-to-build and substitutes
location: /home/pi/code/guix/tests/derivations.scm:824
source:
+ (test-assert
+ "derivation-prerequisites-to-build and substitutes"
+ (let* ((store (open-connection))
+ (drv (build-expression->derivation
+ store
+ "prereq-subst"
+ (random 1000)))
+ (output (derivation->output-path drv)))
+ (set-build-options
+ store
+ #:use-substitutes?
+ #t
+ #:substitute-urls
+ (%test-substitute-urls))
+ (with-derivation-narinfo
+ drv
+ (let-values
+ (((build download)
+ (derivation-prerequisites-to-build store drv))
+ ((build* download*)
+ (derivation-prerequisites-to-build
+ store
+ drv
+ #:substitutable-info
+ (const #f))))
+ (and (null? build)
+ (equal?
+ (map substitutable-path download)
+ (list output))
+ (null? download*)
+ (null? build*))))))
substitute: warning: authentication and authorization of substitutes disabled!
substitute: guix substitute: warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable
actual-value: #t
result: PASS
test-name: derivation-prerequisites-to-build and substitutes, non-substitutable build
location: /home/pi/code/guix/tests/derivations.scm:846
source:
+ (test-assert
+ "derivation-prerequisites-to-build and substitutes, non-substitutable build"
+ (let* ((store (open-connection))
+ (drv (build-expression->derivation
+ store
+ "prereq-no-subst"
+ (random 1000)
+ #:substitutable?
+ #f))
+ (output (derivation->output-path drv)))
+ (set-build-options
+ store
+ #:use-substitutes?
+ #t
+ #:substitute-urls
+ (%test-substitute-urls))
+ (with-derivation-narinfo
+ drv
+ (let-values
+ (((build download)
+ (derivation-prerequisites-to-build store drv)))
+ (and (null? download)
+ (match build
+ (((? derivation-input? input))
+ (string=?
+ (derivation-input-path input)
+ (derivation-file-name drv)))))))))
actual-value: #t
result: PASS
test-name: derivation-prerequisites-to-build and substitutes, local build
location: /home/pi/code/guix/tests/derivations.scm:868
source:
+ (test-assert
+ "derivation-prerequisites-to-build and substitutes, local build"
+ (with-store
+ store
+ (let* ((drv (build-expression->derivation
+ store
+ "prereq-subst-local"
+ (random 1000)
+ #:local-build?
+ #t))
+ (output (derivation->output-path drv)))
+ (set-build-options
+ store
+ #:use-substitutes?
+ #t
+ #:substitute-urls
+ (%test-substitute-urls))
+ (with-derivation-narinfo
+ drv
+ (let-values
+ (((build download)
+ (derivation-prerequisites-to-build store drv)))
+ (and (null? build)
+ (match download
+ (((= substitutable-path item))
+ (string=? item (derivation->output-path drv))))))))))
substitute: warning: authentication and authorization of substitutes disabled!
substitute: guix substitute: warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable
actual-value: #t
result: PASS
test-name: derivation-prerequisites-to-build in 'check' mode
location: /home/pi/code/guix/tests/derivations.scm:890
source:
+ (test-assert
+ "derivation-prerequisites-to-build in 'check' mode"
+ (with-store
+ store
+ (let* ((dep (build-expression->derivation
+ store
+ "dep"
+ `(begin ,(random-text) (mkdir %output))))
+ (drv (build-expression->derivation
+ store
+ "to-check"
+ '(mkdir %output)
+ #:inputs
+ `(("dep" ,dep)))))
+ (build-derivations store (list drv))
+ (delete-paths
+ store
+ (list (derivation->output-path dep)))
+ (and (null? (derivation-prerequisites-to-build store drv))
+ (match (derivation-prerequisites-to-build
+ store
+ drv
+ #:mode
+ (build-mode check))
+ ((input)
+ (string=?
+ (derivation-input-path input)
+ (derivation-file-name dep))))))))
substitute: warning: authentication and authorization of substitutes disabled!
substitute: guix substitute: warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable
building path(s) `/home/pi/code/guix/test-tmp/store/fgigyp37wk28hwkr2rjkyv4kw86x1kch-dep'
building path(s) `/home/pi/code/guix/test-tmp/store/vjjj8ql1jrcw4dwx1aaap032z9j8rr7q-to-check'
finding garbage collector roots...
removing stale temporary roots file `/home/pi/code/guix/test-tmp/var/17552/temproots/17709'
deleting `/home/pi/code/guix/test-tmp/store/fgigyp37wk28hwkr2rjkyv4kw86x1kch-dep'
deleting `/home/pi/code/guix/test-tmp/store/trash'
deleting unused links...
note: currently hard linking saves 148.33 MiB
actual-value: #t
result: PASS
test-name: substitution-oracle and #:substitute? #f
location: /home/pi/code/guix/tests/derivations.scm:910
source:
+ (test-assert
+ "substitution-oracle and #:substitute? #f"
+ (with-store
+ store
+ (let* ((dep (build-expression->derivation
+ store
+ "dep"
+ `(begin ,(random-text) (mkdir %output))))
+ (drv (build-expression->derivation
+ store
+ "not-subst"
+ `(begin ,(random-text) (mkdir %output))
+ #:substitutable?
+ #f
+ #:inputs
+ `(("dep" ,dep))))
+ (query #f))
+ (define (record-substitutable-path-query store paths)
+ (when query (error "already called!" query))
+ (set! query paths)
+ '())
+ (mock ((guix store)
+ substitutable-path-info
+ record-substitutable-path-query)
+ (let ((pred (substitution-oracle store (list drv))))
+ (pred (derivation->output-path drv))))
+ (equal?
+ (pk 'query query)
+ (list (derivation->output-path dep))))))
;;; (query ("/home/pi/code/guix/test-tmp/store/pm0bkabb1qzjdhcb3kxv49dazldi3wyf-dep"))
actual-value: #t
result: PASS
test-name: build-expression->derivation with expression returning #f
location: /home/pi/code/guix/tests/derivations.scm:939
source:
+ (test-assert
+ "build-expression->derivation with expression returning #f"
+ (let* ((builder '(begin (mkdir %output) #f))
+ (drv (build-expression->derivation
+ %store
+ "fail"
+ builder))
+ (out-path (derivation->output-path drv)))
+ (guard (c ((nix-protocol-error? c)
+ (and (string-match
+ "build .* failed"
+ (nix-protocol-error-message c))
+ (not (valid-path? %store out-path)))))
+ (build-derivations %store (list drv))
+ #f)))
@ build-started /home/pi/code/guix/test-tmp/store/h03703p967flfpn7jcf9jcb370xgnr3n-fail.drv - armhf-linux /home/pi/code/guix/test-tmp/var/log/guix/drvs/h0//3703p967flfpn7jcf9jcb370xgnr3n-fail.drv.bz2
builder for `/home/pi/code/guix/test-tmp/store/h03703p967flfpn7jcf9jcb370xgnr3n-fail.drv' failed with exit code 1
@ build-failed /home/pi/code/guix/test-tmp/store/h03703p967flfpn7jcf9jcb370xgnr3n-fail.drv - 1 builder for `/home/pi/code/guix/test-tmp/store/h03703p967flfpn7jcf9jcb370xgnr3n-fail.drv' failed with exit code 1
actual-value: #t
result: PASS
test-name: build-expression->derivation with two outputs
location: /home/pi/code/guix/tests/derivations.scm:954
source:
+ (test-assert
+ "build-expression->derivation with two outputs"
+ (let* ((builder
+ '(begin
+ (call-with-output-file
+ (assoc-ref %outputs "out")
+ (lambda (p) (display '(hello) p)))
+ (call-with-output-file
+ (assoc-ref %outputs "second")
+ (lambda (p) (display '(world) p)))))
+ (drv (build-expression->derivation
+ %store
+ "double"
+ builder
+ #:outputs
+ '("out" "second")))
+ (succeeded?
+ (build-derivations %store (list drv))))
+ (and succeeded?
+ (let ((one (derivation->output-path drv))
+ (two (derivation->output-path drv "second")))
+ (and (equal? '(hello) (call-with-input-file one read))
+ (equal? '(world) (call-with-input-file two read)))))))
actual-value: #t
result: PASS
test-name: build-expression->derivation with one input
location: /home/pi/code/guix/tests/derivations.scm:973
source:
+ (test-assert
+ "build-expression->derivation with one input"
+ (let* ((builder
+ '(call-with-output-file
+ %output
+ (lambda (p)
+ (let ((cu (assoc-ref %build-inputs "cu")))
+ (close 1)
+ (dup2 (port->fdes p) 1)
+ (execl (string-append cu "/bin/uname")
+ "uname"
+ "-a")))))
+ (drv (build-expression->derivation
+ %store
+ "uname"
+ builder
+ #:inputs
+ `(("cu" ,%coreutils))))
+ (succeeded?
+ (build-derivations %store (list drv))))
+ (and succeeded?
+ (let ((p (derivation->output-path drv)))
+ (string-contains
+ (call-with-input-file p read-line)
+ "GNU")))))
actual-value: 66
result: PASS
test-name: build-expression->derivation with modules
location: /home/pi/code/guix/tests/derivations.scm:989
source:
+ (test-assert
+ "build-expression->derivation with modules"
+ (let* ((builder
+ `(begin
+ (use-modules (guix build utils))
+ (let ((out (assoc-ref %outputs "out")))
+ (mkdir-p (string-append out "/guile/guix/nix"))
+ #t)))
+ (drv (build-expression->derivation
+ %store
+ "test-with-modules"
+ builder
+ #:modules
+ '((guix build utils)))))
+ (and (build-derivations %store (list drv))
+ (let* ((p (derivation->output-path drv))
+ (s (stat (string-append p "/guile/guix/nix"))))
+ (eq? (stat:type s) 'directory)))))
actual-value: #t
result: PASS
test-name: build-expression->derivation: same fixed-output path
location: /home/pi/code/guix/tests/derivations.scm:1004
source:
+ (test-assert
+ "build-expression->derivation: same fixed-output path"
+ (let* ((builder1
+ '(call-with-output-file
+ %output
+ (lambda (p) (write "hello" p))))
+ (builder2
+ '(call-with-output-file
+ (pk 'difference-here! %output)
+ (lambda (p) (write "hello" p))))
+ (hash (sha256 (string->utf8 "hello")))
+ (input1
+ (build-expression->derivation
+ %store
+ "fixed"
+ builder1
+ #:hash
+ hash
+ #:hash-algo
+ 'sha256))
+ (input2
+ (build-expression->derivation
+ %store
+ "fixed"
+ builder2
+ #:hash
+ hash
+ #:hash-algo
+ 'sha256))
+ (succeeded?
+ (build-derivations %store (list input1 input2))))
+ (and succeeded?
+ (not (string=?
+ (derivation-file-name input1)
+ (derivation-file-name input2)))
+ (string=?
+ (derivation->output-path input1)
+ (derivation->output-path input2)))))
actual-value: #t
result: PASS
test-name: build-expression->derivation with a fixed-output input
location: /home/pi/code/guix/tests/derivations.scm:1025
source:
+ (test-assert
+ "build-expression->derivation with a fixed-output input"
+ (let* ((builder1
+ '(call-with-output-file
+ %output
+ (lambda (p) (write "hello" p))))
+ (builder2
+ '(call-with-output-file
+ (pk 'difference-here! %output)
+ (lambda (p) (write "hello" p))))
+ (hash (sha256 (string->utf8 "hello")))
+ (input1
+ (build-expression->derivation
+ %store
+ "fixed"
+ builder1
+ #:hash
+ hash
+ #:hash-algo
+ 'sha256))
+ (input2
+ (build-expression->derivation
+ %store
+ "fixed"
+ builder2
+ #:hash
+ hash
+ #:hash-algo
+ 'sha256))
+ (builder3
+ '(let ((input (assoc-ref %build-inputs "input")))
+ (call-with-output-file
+ %output
+ (lambda (out)
+ (format #f "My input is ~a.~%" input)))))
+ (final1
+ (build-expression->derivation
+ %store
+ "final"
+ builder3
+ #:inputs
+ `(("input" ,input1))))
+ (final2
+ (build-expression->derivation
+ %store
+ "final"
+ builder3
+ #:inputs
+ `(("input" ,input2)))))
+ (and (string=?
+ (derivation->output-path final1)
+ (derivation->output-path final2))
+ (string=?
+ (derivation->output-path final1)
+ (derivation-path->output-path
+ (derivation-file-name final1)))
+ (build-derivations %store (list final1 final2)))))
actual-value: #t
result: PASS
test-name: build-expression->derivation produces recursive fixed-output
location: /home/pi/code/guix/tests/derivations.scm:1056
source:
+ (test-assert
+ "build-expression->derivation produces recursive fixed-output"
+ (let* ((builder
+ '(begin
+ (use-modules (srfi srfi-26))
+ (mkdir %output)
+ (chdir %output)
+ (call-with-output-file
+ "exe"
+ (cut display "executable" <>))
+ (chmod "exe" 511)
+ (symlink "exe" "symlink")
+ (mkdir "subdir")))
+ (drv (build-expression->derivation
+ %store
+ "fixed-rec"
+ builder
+ #:hash-algo
+ 'sha256
+ #:hash
+ (base32
+ "10k1lw41wyrjf9mxydi0is5nkpynlsvgslinics4ppir13g7d74p")
+ #:recursive?
+ #t)))
+ (and (build-derivations %store (list drv))
+ (let* ((dir (derivation->output-path drv))
+ (exe (string-append dir "/exe"))
+ (link (string-append dir "/symlink"))
+ (subdir (string-append dir "/subdir")))
+ (and (executable-file? exe)
+ (string=?
+ "executable"
+ (call-with-input-file exe get-string-all))
+ (string=? "exe" (readlink link))
+ (file-is-directory? subdir))))))
actual-value: #t
result: PASS
test-name: build-expression->derivation uses recursive fixed-output
location: /home/pi/code/guix/tests/derivations.scm:1082
source:
+ (test-assert
+ "build-expression->derivation uses recursive fixed-output"
+ (let* ((builder
+ '(call-with-output-file
+ %output
+ (lambda (port) (display "hello" port))))
+ (fixed (build-expression->derivation
+ %store
+ "small-fixed-rec"
+ builder
+ #:hash-algo
+ 'sha256
+ #:hash
+ (base32
+ "0sg9f58l1jj88w6pdrfdpj5x9b1zrwszk84j81zvby36q9whhhqa")
+ #:recursive?
+ #t))
+ (in (derivation->output-path fixed))
+ (builder
+ `(begin
+ (mkdir %output)
+ (chdir %output)
+ (symlink ,in "symlink")))
+ (drv (build-expression->derivation
+ %store
+ "fixed-rec-user"
+ builder
+ #:inputs
+ `(("fixed" ,fixed)))))
+ (and (build-derivations %store (list drv))
+ (let ((out (derivation->output-path drv)))
+ (string=?
+ (readlink (string-append out "/symlink"))
+ in)))))
actual-value: #t
result: PASS
test-name: build-expression->derivation with #:references-graphs
location: /home/pi/code/guix/tests/derivations.scm:1104
source:
+ (test-assert
+ "build-expression->derivation with #:references-graphs"
+ (let* ((input (add-text-to-store
+ %store
+ "foo"
+ "hello"
+ (list %bash %mkdir)))
+ (builder '(copy-file "input" %output))
+ (drv (build-expression->derivation
+ %store
+ "references-graphs"
+ builder
+ #:references-graphs
+ `(("input" unquote input))))
+ (out (derivation->output-path drv)))
+ (define (deps path . deps)
+ (let ((count (length deps)))
+ (string-append
+ path
+ "\n\n"
+ (number->string count)
+ "\n"
+ (string-join (sort deps string<?) "\n")
+ (if (zero? count) "" "\n"))))
+ (and (build-derivations %store (list drv))
+ (equal?
+ (call-with-input-file out get-string-all)
+ (string-concatenate
+ (map cdr
+ (sort (map (lambda (p d) (cons p (apply deps p d)))
+ (list input %bash %mkdir)
+ (list (list %bash %mkdir) '() '()))
+ (lambda (x y)
+ (match x
+ ((p1 . _)
+ (match y
+ ((p2 . _)
+ (string<? p1 p2)))))))))))))
actual-value: #t
result: PASS
test-name: map-derivation
location: /home/pi/code/guix/tests/derivations.scm:1135
source:
+ (test-equal
+ "map-derivation"
+ "hello"
+ (let* ((joke (package-derivation %store guile-1.8))
+ (good (package-derivation %store %bootstrap-guile))
+ (drv1 (build-expression->derivation
+ %store
+ "original-drv1"
+ #f
+ #:guile-for-build
+ joke))
+ (drv2 (build-expression->derivation
+ %store
+ "original-drv2"
+ '(call-with-output-file
+ %output
+ (lambda (p) (display "hello" p)))))
+ (drv3 (build-expression->derivation
+ %store
+ "drv-to-remap"
+ '(let ((in (assoc-ref %build-inputs "in")))
+ (copy-file in %output))
+ #:inputs
+ `(("in" ,drv1))
+ #:guile-for-build
+ joke))
+ (drv4 (map-derivation
+ %store
+ drv3
+ `((,drv1 unquote drv2) (,joke unquote good))))
+ (out (derivation->output-path drv4)))
+ (and (build-derivations
+ %store
+ (list (pk 'remapped drv4)))
+ (call-with-input-file out get-string-all))))
;;; (remapped #<derivation /home/pi/code/guix/test-tmp/store/6pr5nxj66dr2w9yplh367nxpxqllhvxj-drv-to-remap.drv => /home/pi/code/guix/test-tmp/store/vsd80m8v2rgiahc1fr3b5p3zjdwwsad6-drv-to-remap 288da50>)
expected-value: "hello"
actual-value: "hello"
result: PASS
test-name: map-derivation, sources
location: /home/pi/code/guix/tests/derivations.scm:1158
source:
+ (test-equal
+ "map-derivation, sources"
+ "hello"
+ (let* ((script1
+ (add-text-to-store %store "fail.sh" "exit 1"))
+ (script2
+ (add-text-to-store
+ %store
+ "hi.sh"
+ "echo -n hello > $out"))
+ (bash-full
+ (package-derivation
+ %store
+ (@ (gnu packages bash) bash)))
+ (drv1 (derivation
+ %store
+ "drv-to-remap"
+ (derivation->output-path bash-full)
+ `("-e" ,script1)
+ #:inputs
+ `((,bash-full) (,script1))))
+ (drv2 (map-derivation
+ %store
+ drv1
+ `((,bash-full unquote %bash)
+ (,script1 unquote script2))))
+ (out (derivation->output-path drv2)))
+ (and (build-derivations
+ %store
+ (list (pk 'remapped* drv2)))
+ (call-with-input-file out get-string-all))))
;;; (remapped* #<derivation /home/pi/code/guix/test-tmp/store/9cqwmq3s5pa6ym3n0q1afcrn59m09rmw-drv-to-remap.drv => /home/pi/code/guix/test-tmp/store/d6rs0yzcqb786kmqvf6sxb074k95mfmi-drv-to-remap 2971a50>)
expected-value: "hello"
actual-value: "hello"
result: PASS
FAIL: tests/store
=================
test-name: open-connection with file:// URI
location: /home/pi/code/guix/tests/store.scm:51
source:
+ (test-assert
+ "open-connection with file:// URI"
+ (let ((store (open-connection
+ (string-append "file://" (%daemon-socket-uri)))))
+ (and (add-text-to-store store "foo" "bar")
+ (begin (close-connection store) #t))))
actual-value: #f
actual-error:
+ (wrong-type-arg
+ #f
+ "Wrong type to apply: ~S"
+ (#<syntax-transformer uri?>)
+ (#<syntax-transformer uri?>))
result: FAIL
test-name: connection handshake error
location: /home/pi/code/guix/tests/store.scm:59
source:
+ (test-equal
+ "connection handshake error"
+ EPROTO
+ (let ((port (%make-void-port "rw")))
+ (guard (c ((nix-connection-error? c)
+ (and (eq? port (nix-connection-error-file c))
+ (nix-connection-error-code c))))
+ (open-connection #f #:port port)
+ 'broken)))
expected-value: 71
actual-value: 71
result: PASS
test-name: store-path-hash-part
location: /home/pi/code/guix/tests/store.scm:68
source:
+ (test-equal
+ "store-path-hash-part"
+ "283gqy39v3g9dxjy26rynl0zls82fmcg"
+ (store-path-hash-part
+ (string-append
+ (%store-prefix)
+ "/283gqy39v3g9dxjy26rynl0zls82fmcg-guile-2.0.7")))
expected-value: "283gqy39v3g9dxjy26rynl0zls82fmcg"
actual-value: "283gqy39v3g9dxjy26rynl0zls82fmcg"
result: PASS
test-name: store-path-hash-part #f
location: /home/pi/code/guix/tests/store.scm:74
source:
+ (test-equal
+ "store-path-hash-part #f"
+ #f
+ (store-path-hash-part
+ (string-append
+ (%store-prefix)
+ "/foo/bar/283gqy39v3g9dxjy26rynl0zls82fmcg-guile-2.0.7")))
expected-value: #f
actual-value: #f
result: PASS
test-name: store-path-package-name
location: /home/pi/code/guix/tests/store.scm:80
source:
+ (test-equal
+ "store-path-package-name"
+ "guile-2.0.7"
+ (store-path-package-name
+ (string-append
+ (%store-prefix)
+ "/283gqy39v3g9dxjy26rynl0zls82fmcg-guile-2.0.7")))
expected-value: "guile-2.0.7"
actual-value: "guile-2.0.7"
result: PASS
test-name: store-path-package-name #f
location: /home/pi/code/guix/tests/store.scm:86
source:
+ (test-equal
+ "store-path-package-name #f"
+ #f
+ (store-path-package-name
+ "/foo/bar/283gqy39v3g9dxjy26rynl0zls82fmcg-guile-2.0.7"))
expected-value: #f
actual-value: #f
result: PASS
test-name: direct-store-path?
location: /home/pi/code/guix/tests/store.scm:91
source:
+ (test-assert
+ "direct-store-path?"
+ (and (direct-store-path?
+ (string-append
+ (%store-prefix)
+ "/283gqy39v3g9dxjy26rynl0zls82fmcg-guile-2.0.7"))
+ (not (direct-store-path?
+ (string-append
+ (%store-prefix)
+ "/283gqy39v3g9dxjy26rynl0zls82fmcg-guile-2.0.7/bin/guile")))
+ (not (direct-store-path? (%store-prefix)))))
actual-value: #t
result: PASS
test-name: add-data-to-store
location: /home/pi/code/guix/tests/store.scm:103
source:
+ (test-equal
+ "add-data-to-store"
+ #vu8(1 2 3 4 5)
+ (call-with-input-file
+ (add-data-to-store %store "data" #vu8(1 2 3 4 5))
+ get-bytevector-all))
expected-value: #vu8(1 2 3 4 5)
actual-value: #vu8(1 2 3 4 5)
result: PASS
test-name: valid-path? live
location: /home/pi/code/guix/tests/store.scm:108
source:
+ (test-assert
+ "valid-path? live"
+ (let ((p (add-text-to-store %store "hello" "hello, world")))
+ (valid-path? %store p)))
actual-value: #t
result: PASS
test-name: valid-path? false
location: /home/pi/code/guix/tests/store.scm:112
source:
+ (test-assert
+ "valid-path? false"
+ (not (valid-path?
+ %store
+ (string-append
+ (%store-prefix)
+ "/"
+ (make-string 32 #\e)
+ "-foobar"))))
actual-value: #t
result: PASS
test-name: valid-path? error
location: /home/pi/code/guix/tests/store.scm:117
source:
+ (test-assert
+ "valid-path? error"
+ (with-store
+ s
+ (guard (c ((nix-protocol-error? c) #t))
+ (valid-path? s "foo")
+ #f)))
actual-value: #t
result: PASS
test-name: valid-path? recovery
location: /home/pi/code/guix/tests/store.scm:123
source:
+ (test-assert
+ "valid-path? recovery"
+ (with-store
+ s
+ (let-syntax ((true-if-error
+ (syntax-rules ()
+ ((_ exp)
+ (guard (c ((nix-protocol-error? c) #t)) exp #f)))))
+ (and (true-if-error (valid-path? s "foo"))
+ (true-if-error (valid-path? s "bar"))
+ (true-if-error (valid-path? s "baz"))
+ (true-if-error (valid-path? s "chbouib"))
+ (valid-path?
+ s
+ (add-text-to-store s "valid" "yeah"))))))
actual-value: #t
result: PASS
test-name: hash-part->path
location: /home/pi/code/guix/tests/store.scm:140
source:
+ (test-assert
+ "hash-part->path"
+ (let ((p (add-text-to-store %store "hello" "hello, world")))
+ (equal?
+ (hash-part->path %store (store-path-hash-part p))
+ p)))
actual-value: #t
result: PASS
test-name: dead-paths
location: /home/pi/code/guix/tests/store.scm:145
source:
+ (test-assert
+ "dead-paths"
+ (let ((p (add-text-to-store
+ %store
+ "random-text"
+ (random-text))))
+ (->bool (member p (dead-paths %store)))))
random seed for tests: 1522718338
finding garbage collector roots...
removing stale temporary roots file `/home/pi/code/guix/test-tmp/var/17554/temproots/17615'
determining live/dead paths...
actual-value: #t
result: PASS
test-name: permanent root
location: /home/pi/code/guix/tests/store.scm:166
source:
+ (test-assert
+ "permanent root"
+ (let* ((p (with-store
+ store
+ (let ((p (add-text-to-store
+ store
+ "random-text"
+ (random-text))))
+ (add-permanent-root p)
+ (add-permanent-root p)
+ p))))
+ (and (member p (live-paths %store))
+ (begin
+ (remove-permanent-root p)
+ (->bool (member p (dead-paths %store)))))))
finding garbage collector roots...
determining live/dead paths...
finding garbage collector roots...
determining live/dead paths...
actual-value: #t
result: PASS
test-name: dead path can be explicitly collected
location: /home/pi/code/guix/tests/store.scm:178
source:
+ (test-assert
+ "dead path can be explicitly collected"
+ (let ((p (add-text-to-store
+ %store
+ "random-text"
+ (random-text)
+ '())))
+ (let-values
+ (((paths freed) (delete-paths %store (list p))))
+ (and (equal? paths (list p))
+ (not (file-exists? p))))))
finding garbage collector roots...
deleting unused links...
actual-value: #t
result: PASS
test-name: add-text-to-store vs. delete-paths
location: /home/pi/code/guix/tests/store.scm:188
source:
+ (test-assert
+ "add-text-to-store vs. delete-paths"
+ (with-store
+ store
+ (let* ((text (random-text))
+ (path (add-text-to-store store "delete-me" text))
+ (deleted (delete-paths store (list path)))
+ (path2 (add-text-to-store store "delete-me" text)))
+ (and (string=? path path2)
+ (equal? deleted (list path))
+ (valid-path? store path)
+ (file-exists? path)))))
finding garbage collector roots...
removing stale temporary roots file `/home/pi/code/guix/test-tmp/var/17554/temproots/17705'
deleting `/home/pi/code/guix/test-tmp/store/8j061dyip0ygzq1884ph413rdzy5bcl8-delete-me'
deleting `/home/pi/code/guix/test-tmp/store/trash'
deleting unused links...
note: currently hard linking saves 148.33 MiB
actual-value: #t
result: PASS
test-name: add-to-store vs. delete-paths
location: /home/pi/code/guix/tests/store.scm:201
source:
+ (test-assert
+ "add-to-store vs. delete-paths"
+ (with-store
+ store
+ (let* ((file (search-path %load-path "guix.scm"))
+ (path (add-to-store store "delete-me" #t "sha256" file))
+ (deleted (delete-paths store (list path)))
+ (path2 (add-to-store store "delete-me" #t "sha256" file)))
+ (and (string=? path path2)
+ (equal? deleted (list path))
+ (valid-path? store path)
+ (file-exists? path)))))
finding garbage collector roots...
removing stale temporary roots file `/home/pi/code/guix/test-tmp/var/17554/temproots/17720'
deleting `/home/pi/code/guix/test-tmp/store/0lc40p8dvwgfq077kjq4x79pfg8845ik-delete-me'
deleting `/home/pi/code/guix/test-tmp/store/trash'
deleting unused links...
note: currently hard linking saves 148.32 MiB
actual-value: #t
result: PASS
test-name: references
location: /home/pi/code/guix/tests/store.scm:213
source:
+ (test-assert
+ "references"
+ (let* ((t1 (add-text-to-store
+ %store
+ "random1"
+ (random-text)))
+ (t2 (add-text-to-store
+ %store
+ "random2"
+ (random-text)
+ (list t1))))
+ (and (equal? (list t1) (references %store t2))
+ (equal? (list t2) (referrers %store t1))
+ (null? (references %store t1))
+ (null? (referrers %store t2)))))
actual-value: #t
result: PASS
test-name: references/substitutes missing reference info
location: /home/pi/code/guix/tests/store.scm:223
source:
+ (test-assert
+ "references/substitutes missing reference info"
+ (with-store
+ s
+ (set-build-options s #:use-substitutes? #f)
+ (guard (c ((nix-protocol-error? c) #t))
+ (let* ((b (add-to-store
+ s
+ "bash"
+ #t
+ "sha256"
+ (search-bootstrap-binary
+ "bash"
+ (%current-system))))
+ (d (derivation
+ s
+ "the-thing"
+ b
+ '("--help")
+ #:inputs
+ `((,b)))))
+ (references/substitutes
+ s
+ (list (derivation->output-path d) b))
+ #f))))
actual-value: #t
result: PASS
test-name: references/substitutes with substitute info
location: /home/pi/code/guix/tests/store.scm:235
source:
+ (test-assert
+ "references/substitutes with substitute info"
+ (with-store
+ s
+ (set-build-options s #:use-substitutes? #t)
+ (let* ((t1 (add-text-to-store s "random1" (random-text)))
+ (t2 (add-text-to-store
+ s
+ "random2"
+ (random-text)
+ (list t1)))
+ (t3 (add-text-to-store
+ s
+ "build"
+ "echo -n $t2 > $out"))
+ (b (add-to-store
+ s
+ "bash"
+ #t
+ "sha256"
+ (search-bootstrap-binary
+ "bash"
+ (%current-system))))
+ (d (derivation
+ s
+ "the-thing"
+ b
+ `("-e" ,t3)
+ #:inputs
+ `((,b) (,t3) (,t2))
+ #:env-vars
+ `(("t2" unquote t2))))
+ (o (derivation->output-path d)))
+ (with-derivation-narinfo
+ d
+ (sha256 => (sha256 (string->utf8 t2)))
+ (references => (list t2))
+ (equal?
+ (references/substitutes s (list o t3 t2 t1))
+ `((,t2) () (,t1) ()))))))
substitute: warning: authentication and authorization of substitutes disabled!
substitute: guix substitute: warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable
actual-value: #t
result: PASS
test-name: substitutable-path-info when substitutes are turned off
location: /home/pi/code/guix/tests/store.scm:259
source:
+ (test-equal
+ "substitutable-path-info when substitutes are turned off"
+ '()
+ (with-store
+ s
+ (set-build-options s #:use-substitutes? #f)
+ (let* ((b (add-to-store
+ s
+ "bash"
+ #t
+ "sha256"
+ (search-bootstrap-binary
+ "bash"
+ (%current-system))))
+ (d (derivation
+ s
+ "the-thing"
+ b
+ '("--version")
+ #:inputs
+ `((,b))))
+ (o (derivation->output-path d)))
+ (with-derivation-narinfo
+ d
+ (substitutable-path-info s (list o))))))
expected-value: ()
actual-value: ()
result: PASS
test-name: substitutable-paths when substitutes are turned off
location: /home/pi/code/guix/tests/store.scm:272
source:
+ (test-equal
+ "substitutable-paths when substitutes are turned off"
+ '()
+ (with-store
+ s
+ (set-build-options s #:use-substitutes? #f)
+ (let* ((b (add-to-store
+ s
+ "bash"
+ #t
+ "sha256"
+ (search-bootstrap-binary
+ "bash"
+ (%current-system))))
+ (d (derivation
+ s
+ "the-thing"
+ b
+ '("--version")
+ #:inputs
+ `((,b))))
+ (o (derivation->output-path d)))
+ (with-derivation-narinfo
+ d
+ (substitutable-paths s (list o))))))
expected-value: ()
actual-value: ()
result: PASS
test-name: requisites
location: /home/pi/code/guix/tests/store.scm:285
source:
+ (test-assert
+ "requisites"
+ (let* ((t1 (add-text-to-store
+ %store
+ "random1"
+ (random-text)
+ '()))
+ (t2 (add-text-to-store
+ %store
+ "random2"
+ (random-text)
+ (list t1)))
+ (t3 (add-text-to-store
+ %store
+ "random3"
+ (random-text)
+ (list t2)))
+ (t4 (add-text-to-store
+ %store
+ "random4"
+ (random-text)
+ (list t1 t3))))
+ (define (same? x y)
+ (and (= (length x) (length y))
+ (lset= equal? x y)))
+ (and (same? (requisites %store (list t1)) (list t1))
+ (same? (requisites %store (list t2))
+ (list t1 t2))
+ (same? (requisites %store (list t3))
+ (list t1 t2 t3))
+ (same? (requisites %store (list t4))
+ (list t1 t2 t3 t4))
+ (same? (requisites %store (list t1 t2 t3 t4))
+ (list t1 t2 t3 t4)))))
actual-value: #t
result: PASS
test-name: derivers
location: /home/pi/code/guix/tests/store.scm:305
source:
+ (test-assert
+ "derivers"
+ (let* ((b (add-text-to-store
+ %store
+ "build"
+ "echo $foo > $out"
+ '()))
+ (s (add-to-store
+ %store
+ "bash"
+ #t
+ "sha256"
+ (search-bootstrap-binary
+ "bash"
+ (%current-system))))
+ (d (derivation
+ %store
+ "the-thing"
+ s
+ `("-e" ,b)
+ #:env-vars
+ `(("foo" unquote (random-text)))
+ #:inputs
+ `((,b) (,s))))
+ (o (derivation->output-path d)))
+ (and (build-derivations %store (list d))
+ (equal?
+ (query-derivation-outputs
+ %store
+ (derivation-file-name d))
+ (list o))
+ (equal?
+ (valid-derivers %store o)
+ (list (derivation-file-name d))))))
@ build-started /home/pi/code/guix/test-tmp/store/rdmhgav6v7qpcfpi5q8lxrckdjyh9pdl-the-thing.drv - armhf-linux /home/pi/code/guix/test-tmp/var/log/guix/drvs/rd//mhgav6v7qpcfpi5q8lxrckdjyh9pdl-the-thing.drv.bz2
@ build-succeeded /home/pi/code/guix/test-tmp/store/rdmhgav6v7qpcfpi5q8lxrckdjyh9pdl-the-thing.drv -
actual-value: #t
result: PASS
test-name: topologically-sorted, one item
location: /home/pi/code/guix/tests/store.scm:321
source:
+ (test-assert
+ "topologically-sorted, one item"
+ (let* ((a (add-text-to-store %store "a" "a"))
+ (b (add-text-to-store %store "b" "b" (list a)))
+ (c (add-text-to-store %store "c" "c" (list b)))
+ (d (add-text-to-store %store "d" "d" (list c)))
+ (s (topologically-sorted %store (list d))))
+ (equal? s (list a b c d))))
actual-value: #t
result: PASS
test-name: topologically-sorted, several items
location: /home/pi/code/guix/tests/store.scm:329
source:
+ (test-assert
+ "topologically-sorted, several items"
+ (let* ((a (add-text-to-store %store "a" "a"))
+ (b (add-text-to-store %store "b" "b" (list a)))
+ (c (add-text-to-store %store "c" "c" (list b)))
+ (d (add-text-to-store %store "d" "d" (list c)))
+ (s1 (topologically-sorted %store (list d a c b)))
+ (s2 (topologically-sorted %store (list b d c a b d))))
+ (equal? s1 s2 (list a b c d))))
actual-value: #t
result: PASS
test-name: topologically-sorted, more difficult
location: /home/pi/code/guix/tests/store.scm:338
source:
+ (test-assert
+ "topologically-sorted, more difficult"
+ (let* ((a (add-text-to-store %store "a" "a"))
+ (b (add-text-to-store %store "b" "b" (list a)))
+ (c (add-text-to-store %store "c" "c" (list b)))
+ (d (add-text-to-store %store "d" "d" (list c)))
+ (w (add-text-to-store %store "w" "w"))
+ (x (add-text-to-store %store "x" "x" (list w)))
+ (y (add-text-to-store %store "y" "y" (list x d)))
+ (s1 (topologically-sorted %store (list y)))
+ (s2 (topologically-sorted %store (list c y)))
+ (s3 (topologically-sorted
+ %store
+ (cons y (references %store y)))))
+ (let* ((x-then-d?
+ (equal? (references %store y) (list x d))))
+ (and (equal?
+ s1
+ (if x-then-d?
+ (list w x a b c d y)
+ (list a b c d w x y)))
+ (equal?
+ s2
+ (if x-then-d?
+ (list a b c w x d y)
+ (list a b c d w x y)))
+ (lset= string=? s1 s3)))))
actual-value: #t
result: PASS
test-name: current-build-output-port, UTF-8
location: /home/pi/code/guix/tests/store.scm:362
source:
+ (test-assert
+ "current-build-output-port, UTF-8"
+ (string-contains
+ (with-fluids
+ ((%default-port-encoding "UTF-8"))
+ (call-with-output-string
+ (lambda (port)
+ (parameterize
+ ((current-build-output-port port))
+ (let* ((s "Here’s a Greek letter: λ.")
+ (d (build-expression->derivation
+ %store
+ "foo"
+ `(display ,s)
+ #:guile-for-build
+ (package-derivation
+ s
+ %bootstrap-guile
+ (%current-system)))))
+ (guard (c ((nix-protocol-error? c) #t))
+ (build-derivations %store (list d))))))))
+ "Here’s a Greek letter: λ."))
actual-value: 198
result: PASS
test-name: current-build-output-port, UTF-8 + garbage
location: /home/pi/code/guix/tests/store.scm:378
source:
+ (test-assert
+ "current-build-output-port, UTF-8 + garbage"
+ (string-contains
+ (with-fluids
+ ((%default-port-encoding "UTF-8"))
+ (call-with-output-string
+ (lambda (port)
+ (parameterize
+ ((current-build-output-port port))
+ (let ((d (build-expression->derivation
+ %store
+ "foo"
+ `(begin
+ (use-modules (rnrs io ports))
+ (display "garbage: ")
+ (put-bytevector (current-output-port) #vu8(128))
+ (display "lambda: λ\n"))
+ #:guile-for-build
+ (package-derivation %store %bootstrap-guile))))
+ (guard (c ((nix-protocol-error? c) #t))
+ (build-derivations %store (list d))))))))
+ (cond-expand
+ (guile-2.2 "garbage: �lambda: λ")
+ (else "garbage: ?lambda: λ"))))
actual-value: 198
result: PASS
test-name: log-file, derivation
location: /home/pi/code/guix/tests/store.scm:400
source:
+ (test-assert
+ "log-file, derivation"
+ (let* ((b (add-text-to-store
+ %store
+ "build"
+ "echo $foo > $out"
+ '()))
+ (s (add-to-store
+ %store
+ "bash"
+ #t
+ "sha256"
+ (search-bootstrap-binary
+ "bash"
+ (%current-system))))
+ (d (derivation
+ %store
+ "the-thing"
+ s
+ `("-e" ,b)
+ #:env-vars
+ `(("foo" unquote (random-text)))
+ #:inputs
+ `((,b) (,s)))))
+ (and (build-derivations %store (list d))
+ (file-exists?
+ (pk (log-file %store (derivation-file-name d)))))))
@ build-started /home/pi/code/guix/test-tmp/store/f3w0ygsf33zk79s0fdcx8y7cd50f7lna-the-thing.drv - armhf-linux /home/pi/code/guix/test-tmp/var/log/guix/drvs/f3//w0ygsf33zk79s0fdcx8y7cd50f7lna-the-thing.drv.bz2
@ build-succeeded /home/pi/code/guix/test-tmp/store/f3w0ygsf33zk79s0fdcx8y7cd50f7lna-the-thing.drv -
;;; ("/home/pi/code/guix/test-tmp/var/log/guix/drvs/f3/w0ygsf33zk79s0fdcx8y7cd50f7lna-the-thing.drv.bz2")
actual-value: #t
result: PASS
test-name: log-file, output file name
location: /home/pi/code/guix/tests/store.scm:412
source:
+ (test-assert
+ "log-file, output file name"
+ (let* ((b (add-text-to-store
+ %store
+ "build"
+ "echo $foo > $out"
+ '()))
+ (s (add-to-store
+ %store
+ "bash"
+ #t
+ "sha256"
+ (search-bootstrap-binary
+ "bash"
+ (%current-system))))
+ (d (derivation
+ %store
+ "the-thing"
+ s
+ `("-e" ,b)
+ #:env-vars
+ `(("foo" unquote (random-text)))
+ #:inputs
+ `((,b) (,s))))
+ (o (derivation->output-path d)))
+ (and (build-derivations %store (list d))
+ (file-exists? (pk (log-file %store o)))
+ (string=?
+ (log-file %store (derivation-file-name d))
+ (log-file %store o)))))
@ build-started /home/pi/code/guix/test-tmp/store/9br39dcd3qy4qk6nfymqllldggrjhsi0-the-thing.drv - armhf-linux /home/pi/code/guix/test-tmp/var/log/guix/drvs/9b//r39dcd3qy4qk6nfymqllldggrjhsi0-the-thing.drv.bz2
@ build-succeeded /home/pi/code/guix/test-tmp/store/9br39dcd3qy4qk6nfymqllldggrjhsi0-the-thing.drv -
;;; ("/home/pi/code/guix/test-tmp/var/log/guix/drvs/9b/r39dcd3qy4qk6nfymqllldggrjhsi0-the-thing.drv.bz2")
actual-value: #t
result: PASS
test-name: no substitutes
location: /home/pi/code/guix/tests/store.scm:427
source:
+ (test-assert
+ "no substitutes"
+ (with-store
+ s
+ (let* ((d1 (package-derivation
+ s
+ %bootstrap-guile
+ (%current-system)))
+ (d2 (package-derivation
+ s
+ %bootstrap-glibc
+ (%current-system)))
+ (o (map derivation->output-path (list d1 d2))))
+ (set-build-options s #:use-substitutes? #f)
+ (and (not (has-substitutes? s (derivation-file-name d1)))
+ (not (has-substitutes? s (derivation-file-name d2)))
+ (null? (substitutable-paths s o))
+ (null? (substitutable-path-info s o))))))
actual-value: #t
result: PASS
test-name: build-things with output path
location: /home/pi/code/guix/tests/store.scm:438
source:
+ (test-assert
+ "build-things with output path"
+ (with-store
+ s
+ (let* ((c (random-text))
+ (d (build-expression->derivation
+ s
+ "substitute-me"
+ `(call-with-output-file
+ %output
+ (lambda (p) (display ,c p)))
+ #:guile-for-build
+ (package-derivation
+ s
+ %bootstrap-guile
+ (%current-system))))
+ (o (derivation->output-path d)))
+ (set-build-options s #:use-substitutes? #f)
+ (build-things s (list o))
+ (not (valid-path? s o)))))
actual-value: #t
result: PASS
test-name: substitute query
location: /home/pi/code/guix/tests/store.scm:458
source:
+ (test-assert
+ "substitute query"
+ (with-store
+ s
+ (let* ((d (package-derivation
+ s
+ %bootstrap-guile
+ (%current-system)))
+ (o (derivation->output-path d)))
+ (with-derivation-narinfo
+ d
+ (false-if-exception
+ (delete-file-recursively
+ (string-append
+ (getenv "XDG_CACHE_HOME")
+ "/guix/substitute")))
+ (set-build-options
+ s
+ #:use-substitutes?
+ #t
+ #:substitute-urls
+ (%test-substitute-urls))
+ (and (has-substitutes? s o)
+ (equal?
+ (list o)
+ (substitutable-paths s (list o)))
+ (match (pk 'spi (substitutable-path-info s (list o)))
+ (((? substitutable? s))
+ (and (string=?
+ (substitutable-deriver s)
+ (derivation-file-name d))
+ (null? (substitutable-references s))
+ (equal? (substitutable-nar-size s) 1234)))))))))
substitute: warning: authentication and authorization of substitutes disabled!
substitute: guix substitute: warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable
;;; (spi (#<<substitutable> path: "/home/pi/code/guix/test-tmp/store/kanxp7hbbpid9va08lcc9nmhhalshm2l-guile-bootstrap-2.0" deriver: "/home/pi/code/guix/test-tmp/store/glzscvw7licsjrnpwkv9spkgv65hnbk3-guile-bootstrap-2.0.drv" refs: () dl-size: 0 nar-size: 1234>))
actual-value: #t
result: PASS
test-name: substitute query, alternating URLs
location: /home/pi/code/guix/tests/store.scm:482
source:
+ (test-assert
+ "substitute query, alternating URLs"
+ (let* ((d (with-store
+ s
+ (package-derivation
+ s
+ %bootstrap-guile
+ (%current-system))))
+ (o (derivation->output-path d)))
+ (with-derivation-narinfo
+ d
+ (false-if-exception
+ (delete-file-recursively
+ (string-append
+ (getenv "XDG_CACHE_HOME")
+ "/guix/substitute")))
+ (and (with-store
+ s
+ (set-build-options
+ s
+ #:use-substitutes?
+ #t
+ #:substitute-urls
+ (%test-substitute-urls))
+ (has-substitutes? s o))
+ (with-store
+ s
+ (set-build-options
+ s
+ #:use-substitutes?
+ #t
+ #:substitute-urls
+ (list "http://does-not-exist"))
+ (not (has-substitutes? s o)))
+ (with-store
+ s
+ (set-build-options
+ s
+ #:use-substitutes?
+ #t
+ #:substitute-urls
+ (%test-substitute-urls))
+ (has-substitutes? s o))
+ (with-store
+ s
+ (set-build-options
+ s
+ #:use-substitutes?
+ #t
+ #:substitute-urls
+ '())
+ (not (has-substitutes? s o)))))))
substitute: warning: authentication and authorization of substitutes disabled!
substitute: guix substitute: warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable
substitute: warning: authentication and authorization of substitutes disabled!
substitute: guix substitute: warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable
substitute: Backtrace:
substitute: 3 (apply-smob/1 #<catch-closure b0ae50>)
substitute: In ice-9/boot-9.scm:
substitute: 713:2 2 (call-with-prompt _ _ #<procedure default-prompt-handle…>)
substitute: In ice-9/eval.scm:
substitute: 619:8 1 (_ #(#(#<directory (guile-user) af2910>)))
substitute: In guix/ui.scm:
substitute: 1501:12 0 (run-guix-command _ . _)
substitute:
substitute: guix/ui.scm:1501:12: In procedure run-guix-command:
substitute: guix/ui.scm:1501:12: Wrong type to apply: #<syntax-transformer uri?>
actual-value: #f
actual-error:
+ (srfi-34
+ #<condition &nix-protocol-error [message: "substituter `substitute' died unexpectedly" status: 1] 1dbb7c8>)
result: FAIL
test-name: substitute
location: /home/pi/code/guix/tests/store.scm:514
source:
+ (test-assert
+ "substitute"
+ (with-store
+ s
+ (let* ((c (random-text))
+ (d (build-expression->derivation
+ s
+ "substitute-me"
+ `(call-with-output-file
+ %output
+ (lambda (p) (exit 1) (display ,c p)))
+ #:guile-for-build
+ (package-derivation
+ s
+ %bootstrap-guile
+ (%current-system))))
+ (o (derivation->output-path d)))
+ (with-derivation-substitute
+ d
+ c
+ (set-build-options
+ s
+ #:use-substitutes?
+ #t
+ #:substitute-urls
+ (%test-substitute-urls))
+ (and (has-substitutes? s o)
+ (build-derivations s (list d))
+ (equal?
+ c
+ (call-with-input-file o get-string-all)))))))
substitute: warning: authentication and authorization of substitutes disabled!
substitute: guix substitute: warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable
@ substituter-started /home/pi/code/guix/test-tmp/store/jrjplq4rnkpp5rhkkxcw6xcj7b72vssw-substitute-me /home/pi/code/guix/nix/scripts/substitute
warning: authentication and authorization of substitutes disabled!
guix substitute: warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable
Downloading file:/home/pi/code/guix/test-tmp/var/17554/substituter-data/example.nar...
\r^[[K example.nar 176B 0B/s 00:00 [ ] 0.0%\r^[[K example.nar 176B 115KiB/s 00:00 [##################] 100.0%\r^[[K example.nar 176B 52KiB/s 00:00 [##################] 100.0%
@ substituter-succeeded /home/pi/code/guix/test-tmp/store/jrjplq4rnkpp5rhkkxcw6xcj7b72vssw-substitute-me
actual-value: #t
result: PASS
test-name: substitute + build-things with output path
location: /home/pi/code/guix/tests/store.scm:533
source:
+ (test-assert
+ "substitute + build-things with output path"
+ (with-store
+ s
+ (let* ((c (random-text))
+ (d (build-expression->derivation
+ s
+ "substitute-me"
+ `(call-with-output-file
+ %output
+ (lambda (p) (exit 1) (display ,c p)))
+ #:guile-for-build
+ (package-derivation
+ s
+ %bootstrap-guile
+ (%current-system))))
+ (o (derivation->output-path d)))
+ (with-derivation-substitute
+ d
+ c
+ (set-build-options
+ s
+ #:use-substitutes?
+ #t
+ #:substitute-urls
+ (%test-substitute-urls))
+ (and (has-substitutes? s o)
+ (build-things s (list o))
+ (valid-path? s o)
+ (equal?
+ c
+ (call-with-input-file o get-string-all)))))))
substitute: warning: authentication and authorization of substitutes disabled!
substitute: guix substitute: warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable
@ substituter-started /home/pi/code/guix/test-tmp/store/cxask513a16iwbnndhnx898xx0svc5d2-substitute-me /home/pi/code/guix/nix/scripts/substitute
warning: authentication and authorization of substitutes disabled!
guix substitute: warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable
Downloading file:/home/pi/code/guix/test-tmp/var/17554/substituter-data/example.nar...
\r^[[K example.nar 176B 0B/s 00:00 [ ] 0.0%\r^[[K example.nar 176B 101KiB/s 00:00 [##################] 100.0%\r^[[K example.nar 176B 47KiB/s 00:00 [##################] 100.0%
@ substituter-succeeded /home/pi/code/guix/test-tmp/store/cxask513a16iwbnndhnx898xx0svc5d2-substitute-me
actual-value: #t
result: PASS
test-name: substitute, corrupt output hash
location: /home/pi/code/guix/tests/store.scm:553
source:
+ (test-assert
+ "substitute, corrupt output hash"
+ (with-store
+ s
+ (let* ((c "hello, world")
+ (d (build-expression->derivation
+ s
+ "corrupt-substitute"
+ `(mkdir %output)
+ #:guile-for-build
+ (package-derivation
+ s
+ %bootstrap-guile
+ (%current-system))))
+ (o (derivation->output-path d)))
+ (with-derivation-substitute
+ d
+ c
+ (sha256 => (make-bytevector 32 0))
+ (set-build-options
+ s
+ #:use-substitutes?
+ #t
+ #:fallback?
+ #f
+ #:substitute-urls
+ (%test-substitute-urls))
+ (and (has-substitutes? s o)
+ (guard (c ((nix-protocol-error? c)
+ (pk 'corrupt c)
+ (not (zero? (nix-protocol-error-status c)))))
+ (build-derivations s (list d))
+ #f))))))
substitute: warning: authentication and authorization of substitutes disabled!
substitute: guix substitute: warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable
@ substituter-started /home/pi/code/guix/test-tmp/store/y7l7p84irmy7rfh98hfza89g29325md5-corrupt-substitute /home/pi/code/guix/nix/scripts/substitute
warning: authentication and authorization of substitutes disabled!
guix substitute: warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable
Downloading file:/home/pi/code/guix/test-tmp/var/17554/substituter-data/example.nar...
\r^[[K example.nar 128B 0B/s 00:00 [ ] 0.0%\r^[[K example.nar 128B 81KiB/s 00:00 [##################] 100.0%\r^[[K example.nar 128B 37KiB/s 00:00 [##################] 100.0%
@ substituter-failed /home/pi/code/guix/test-tmp/store/y7l7p84irmy7rfh98hfza89g29325md5-corrupt-substitute 0 hash mismatch in downloaded path `/home/pi/code/guix/test-tmp/store/y7l7p84irmy7rfh98hfza89g29325md5-corrupt-substitute'
expected: 0000000000000000000000000000000000000000000000000000000000000000
actual: b8f73a6eb280e63169b1de2a5b5e154676fe1ada685f1e5c7183cbb2c1dcd535
;;; (corrupt #<condition &nix-protocol-error [message: "some substitutes for the outputs of derivation `/home/pi/code/guix/test-tmp/store/7m9a1sn7b02137kmpny2rc2myaqcsnfv-corrupt-substitute.drv' failed (usually happens due to networking issues); try `--fallback' to build derivation from source " status: 1] 260d7e0>)
actual-value: #t
result: PASS
test-name: substitute --fallback
location: /home/pi/code/guix/tests/store.scm:583
source:
+ (test-assert
+ "substitute --fallback"
+ (with-store
+ s
+ (let* ((t (random-text))
+ (d (build-expression->derivation
+ s
+ "substitute-me-not"
+ `(call-with-output-file
+ %output
+ (lambda (p) (display ,t p)))
+ #:guile-for-build
+ (package-derivation
+ s
+ %bootstrap-guile
+ (%current-system))))
+ (o (derivation->output-path d)))
+ (with-derivation-narinfo
+ d
+ (set-build-options
+ s
+ #:use-substitutes?
+ #t
+ #:substitute-urls
+ (%test-substitute-urls))
+ (and (has-substitutes? s o)
+ (guard (c ((nix-protocol-error? c)
+ (set-build-options
+ s
+ #:use-substitutes?
+ #t
+ #:substitute-urls
+ (%test-substitute-urls)
+ #:fallback?
+ #t)
+ (and (build-derivations s (list d))
+ (equal?
+ t
+ (call-with-input-file o get-string-all)))))
+ (build-derivations s (list d))
+ #f))))))
substitute: warning: authentication and authorization of substitutes disabled!
substitute: guix substitute: warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable
@ substituter-started /home/pi/code/guix/test-tmp/store/zplal8xia8y1dlxzlifb8spvwwjg8mxz-substitute-me-not /home/pi/code/guix/nix/scripts/substitute
warning: authentication and authorization of substitutes disabled!
guix substitute: warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable
Downloading file:/home/pi/code/guix/test-tmp/var/17554/substituter-data/example.nar...
guix substitute: error: open-file: No such file or directory: "/home/pi/code/guix/test-tmp/var/17554/substituter-data/example.nar"
@ substituter-failed /home/pi/code/guix/test-tmp/store/zplal8xia8y1dlxzlifb8spvwwjg8mxz-substitute-me-not 256 fetching path `/home/pi/code/guix/test-tmp/store/zplal8xia8y1dlxzlifb8spvwwjg8mxz-substitute-me-not' failed with exit code 1
@ substituter-started /home/pi/code/guix/test-tmp/store/zplal8xia8y1dlxzlifb8spvwwjg8mxz-substitute-me-not /home/pi/code/guix/nix/scripts/substitute
warning: authentication and authorization of substitutes disabled!
guix substitute: warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable
Downloading file:/home/pi/code/guix/test-tmp/var/17554/substituter-data/example.nar...
guix substitute: error: open-file: No such file or directory: "/home/pi/code/guix/test-tmp/var/17554/substituter-data/example.nar"
@ substituter-failed /home/pi/code/guix/test-tmp/store/zplal8xia8y1dlxzlifb8spvwwjg8mxz-substitute-me-not 256 fetching path `/home/pi/code/guix/test-tmp/store/zplal8xia8y1dlxzlifb8spvwwjg8mxz-substitute-me-not' failed with exit code 1
@ build-started /home/pi/code/guix/test-tmp/store/cqvsgjsp1barr21mqlfcsbyjc9svc2bm-substitute-me-not.drv - armhf-linux /home/pi/code/guix/test-tmp/var/log/guix/drvs/cq//vsgjsp1barr21mqlfcsbyjc9svc2bm-substitute-me-not.drv.bz2
@ build-succeeded /home/pi/code/guix/test-tmp/store/cqvsgjsp1barr21mqlfcsbyjc9svc2bm-substitute-me-not.drv -
actual-value: #t
result: PASS
test-name: export/import several paths
location: /home/pi/code/guix/tests/store.scm:615
source:
+ (test-assert
+ "export/import several paths"
+ (let* ((texts (unfold
+ (cut >= <> 10)
+ (lambda _ (random-text))
+ #{1+}#
+ 0))
+ (files (map (cut add-text-to-store %store "text" <>)
+ texts))
+ (dump (call-with-bytevector-output-port
+ (cut export-paths %store files <>))))
+ (delete-paths %store files)
+ (and (every (negate file-exists?) files)
+ (let* ((source (open-bytevector-input-port dump))
+ (imported (import-paths %store source)))
+ (and (equal? imported files)
+ (every file-exists? files)
+ (equal?
+ texts
+ (map (lambda (file)
+ (call-with-input-file file get-string-all))
+ files)))))))
finding garbage collector roots...
deleting unused links...
actual-value: #t
result: PASS
test-name: export/import paths, ensure topological order
location: /home/pi/code/guix/tests/store.scm:635
source:
+ (test-assert
+ "export/import paths, ensure topological order"
+ (let* ((file0 (add-text-to-store %store "baz" (random-text)))
+ (file1 (add-text-to-store
+ %store
+ "foo"
+ (random-text)
+ (list file0)))
+ (file2 (add-text-to-store
+ %store
+ "bar"
+ (random-text)
+ (list file1)))
+ (files (list file1 file2))
+ (dump1 (call-with-bytevector-output-port
+ (cute export-paths %store (list file1 file2) <>)))
+ (dump2 (call-with-bytevector-output-port
+ (cute export-paths %store (list file2 file1) <>))))
+ (delete-paths %store files)
+ (and (every (negate file-exists?) files)
+ (bytevector=? dump1 dump2)
+ (let* ((source (open-bytevector-input-port dump1))
+ (imported (import-paths %store source)))
+ (and (equal? imported (list file1 file2))
+ (every file-exists? files)
+ (equal? (list file0) (references %store file1))
+ (equal? (list file1) (references %store file2)))))))
finding garbage collector roots...
deleting unused links...
actual-value: #t
result: PASS
test-name: export/import incomplete
location: /home/pi/code/guix/tests/store.scm:657
source:
+ (test-assert
+ "export/import incomplete"
+ (let* ((file0 (add-text-to-store %store "baz" (random-text)))
+ (file1 (add-text-to-store
+ %store
+ "foo"
+ (random-text)
+ (list file0)))
+ (file2 (add-text-to-store
+ %store
+ "bar"
+ (random-text)
+ (list file1)))
+ (dump (call-with-bytevector-output-port
+ (cute export-paths %store (list file2) <>))))
+ (delete-paths %store (list file0 file1 file2))
+ (guard (c ((nix-protocol-error? c)
+ (and (not (zero? (nix-protocol-error-status c)))
+ (string-contains
+ (nix-protocol-error-message c)
+ "not valid"))))
+ (import-paths
+ %store
+ (open-bytevector-input-port dump)))))
finding garbage collector roots...
deleting unused links...
actual-value: 81
result: PASS
test-name: export/import recursive
location: /home/pi/code/guix/tests/store.scm:674
source:
+ (test-assert
+ "export/import recursive"
+ (let* ((file0 (add-text-to-store %store "baz" (random-text)))
+ (file1 (add-text-to-store
+ %store
+ "foo"
+ (random-text)
+ (list file0)))
+ (file2 (add-text-to-store
+ %store
+ "bar"
+ (random-text)
+ (list file1)))
+ (dump (call-with-bytevector-output-port
+ (cute export-paths
+ %store
+ (list file2)
+ <>
+ #:recursive?
+ #t))))
+ (delete-paths %store (list file0 file1 file2))
+ (let ((imported
+ (import-paths
+ %store
+ (open-bytevector-input-port dump))))
+ (and (equal? imported (list file0 file1 file2))
+ (every file-exists? (list file0 file1 file2))
+ (equal? (list file0) (references %store file1))
+ (equal? (list file1) (references %store file2))))))
finding garbage collector roots...
deleting unused links...
actual-value: #t
result: PASS
test-name: write-file & export-path yield the same result
location: /home/pi/code/guix/tests/store.scm:690
source:
+ (test-assert
+ "write-file & export-path yield the same result"
+ (run-with-store
+ %store
+ (mlet* %store-monad
+ ((drv1 (package->derivation %bootstrap-guile))
+ (out1 -> (derivation->output-path drv1))
+ (data ->
+ (unfold
+ (cut >= <> 26)
+ (lambda (i) (random-bytevector 128))
+ #{1+}#
+ 0))
+ (build ->
+ (gexp (begin
+ (use-modules (rnrs io ports) (srfi srfi-1))
+ (let ()
+ (define letters
+ (map (lambda (i)
+ (string
+ (integer->char
+ (+ i (char->integer #\a)))))
+ (iota 26)))
+ (define (touch file data)
+ (call-with-output-file
+ file
+ (lambda (port) (put-bytevector port data))))
+ (mkdir (ungexp output))
+ (chdir (ungexp output))
+ (for-each
+ touch
+ (append (drop letters 10) (take letters 10))
+ (list (ungexp-splicing data)))
+ #t))))
+ (drv2 (gexp->derivation "bunch" build))
+ (out2 -> (derivation->output-path drv2))
+ (item-info -> (store-lift query-path-info)))
+ (mbegin
+ %store-monad
+ (built-derivations (list drv1 drv2))
+ (foldm %store-monad
+ (lambda (item result)
+ (define ref-hash
+ (let-values
+ (((port get) (open-sha256-port)))
+ (write-file item port)
+ (close-port port)
+ (get)))
+ (>>= (item-info item)
+ (lambda (info)
+ (return
+ (and result
+ (bytevector=?
+ (path-info-hash info)
+ ref-hash))))))
+ #t
+ (list out1 out2))))
+ #:guile-for-build
+ (%guile-for-build)))
@ build-started /home/pi/code/guix/test-tmp/store/ark8c3h3ddci2mmr7di6in0ij4f5dyqk-bunch.drv - armhf-linux /home/pi/code/guix/test-tmp/var/log/guix/drvs/ar//k8c3h3ddci2mmr7di6in0ij4f5dyqk-bunch.drv.bz2
@ build-succeeded /home/pi/code/guix/test-tmp/store/ark8c3h3ddci2mmr7di6in0ij4f5dyqk-bunch.drv -
actual-value: #t
result: PASS
test-name: import corrupt path
location: /home/pi/code/guix/tests/store.scm:756
source:
+ (test-assert
+ "import corrupt path"
+ (let* ((text (random-text))
+ (file (add-text-to-store %store "text" text))
+ (dump (call-with-bytevector-output-port
+ (cut export-paths %store (list file) <>))))
+ (delete-paths %store (list file))
+ (let* ((index 112)
+ (byte (bytevector-u8-ref dump index)))
+ (bytevector-u8-set! dump index (logxor 255 byte)))
+ (and (not (file-exists? file))
+ (guard (c ((nix-protocol-error? c)
+ (pk 'c c)
+ (and (not (zero? (nix-protocol-error-status c)))
+ (string-contains
+ (nix-protocol-error-message c)
+ "corrupt"))))
+ (let* ((source (open-bytevector-input-port dump))
+ (imported (import-paths %store source)))
+ (pk 'corrupt-imported imported)
+ #f)))))
finding garbage collector roots...
deleting unused links...
;;; (c #<condition &nix-protocol-error [message: "signed hash doesn't match actual contents of imported archive; archive could be corrupt, or someone is trying to import a Trojan horse" status: 1] 25a8660>)
actual-value: 80
result: PASS
test-name: register-path
location: /home/pi/code/guix/tests/store.scm:780
source:
+ (test-assert
+ "register-path"
+ (let ((file (string-append
+ (%store-prefix)
+ "/"
+ (make-string 32 #\f)
+ "-fake")))
+ (when (valid-path? %store file)
+ (delete-paths %store (list file)))
+ (false-if-exception (delete-file file))
+ (let ((ref (add-text-to-store
+ %store
+ "ref-of-fake"
+ (random-text)))
+ (drv (string-append file ".drv")))
+ (call-with-output-file
+ file
+ (cut display "This is a fake store item.\n" <>))
+ (register-path
+ file
+ #:references
+ (list ref)
+ #:deriver
+ drv)
+ (and (valid-path? %store file)
+ (equal? (references %store file) (list ref))
+ (null? (valid-derivers %store file))
+ (null? (referrers %store file))))))
finding garbage collector roots...
deleting unused links...
actual-value: #t
result: PASS
test-name: verify-store
location: /home/pi/code/guix/tests/store.scm:800
source:
+ (test-assert
+ "verify-store"
+ (let* ((text (random-text))
+ (file1 (add-text-to-store %store "foo" text))
+ (file2 (add-text-to-store
+ %store
+ "bar"
+ (random-text)
+ (list file1))))
+ (and (pk 'verify1 (verify-store %store))
+ (begin
+ (delete-file file1)
+ (not (pk 'verify2 (verify-store %store))))
+ (begin
+ (call-with-output-file
+ file1
+ (lambda (port) (display text port)))
+ (pk 'verify3 (verify-store %store))))))
reading the Nix store...
;;; (verify1 #t)
reading the Nix store...
path `/home/pi/code/guix/test-tmp/store/bgcysbii1wvrcwqzf3ywfa12aykm9fy1-foo' disappeared, but it still has valid referrers!
;;; (verify2 #f)
reading the Nix store...
;;; (verify3 #t)
actual-value: #t
result: PASS
test-name: verify-store + check-contents
location: /home/pi/code/guix/tests/store.scm:817
source:
+ (test-assert
+ "verify-store + check-contents"
+ (with-store
+ s
+ (let* ((text (random-text))
+ (drv (build-expression->derivation
+ s
+ "corrupt"
+ `(let ((out (assoc-ref %outputs "out")))
+ (call-with-output-file
+ out
+ (lambda (port) (display ,text port)))
+ #t)
+ #:guile-for-build
+ (package-derivation
+ s
+ %bootstrap-guile
+ (%current-system))))
+ (file (derivation->output-path drv)))
+ (with-derivation-substitute
+ drv
+ text
+ (and (build-derivations s (list drv))
+ (verify-store s #:check-contents? #t)
+ (begin
+ (chmod file 420)
+ (call-with-output-file
+ file
+ (lambda (port) (display "corrupt!" port)))
+ #t)
+ (not (verify-store s #:check-contents? #t))
+ (delete-paths s (list file)))))))
substitute: warning: authentication and authorization of substitutes disabled!
substitute: guix substitute: warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable
fetching path `/home/pi/code/guix/test-tmp/store/2widv0182wv03lywjixpl3a003r8m3xm-corrupt'...
warning: authentication and authorization of substitutes disabled!
guix substitute: warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable
Downloading file:/home/pi/code/guix/test-tmp/var/17554/substituter-data/example.nar...
\r^[[K example.nar 176B 0B/s 00:00 [ ] 0.0%\r^[[K example.nar 176B 111KiB/s 00:00 [##################] 100.0%\r^[[K example.nar 176B 50KiB/s 00:00 [##################] 100.0%
reading the Nix store...
checking path existence...
checking hashes...
reading the Nix store...
checking path existence...
checking hashes...
path `/home/pi/code/guix/test-tmp/store/2widv0182wv03lywjixpl3a003r8m3xm-corrupt' was modified! expected hash `adb80f7aa0425e828e12460c0f4e5553e86d247da9f0c2bdb2510f1cbf627b18', got `e09c480e2e93336cd3c45aa129f81a0d7ba56c410b849d7779a8136074413b3d'
finding garbage collector roots...
removing stale temporary roots file `/home/pi/code/guix/test-tmp/var/17554/temproots/17932'
deleting `/home/pi/code/guix/test-tmp/store/2widv0182wv03lywjixpl3a003r8m3xm-corrupt'
deleting `/home/pi/code/guix/test-tmp/store/trash'
deleting unused links...
note: currently hard linking saves 148.33 MiB
actual-value: ("/home/pi/code/guix/test-tmp/store/2widv0182wv03lywjixpl3a003r8m3xm-corrupt")
result: PASS
test-name: build-things, check mode
location: /home/pi/code/guix/tests/store.scm:854
source:
+ (test-assert
+ "build-things, check mode"
+ (with-store
+ store
+ (call-with-temporary-output-file
+ (lambda (entropy entropy-port)
+ (write (random-text) entropy-port)
+ (force-output entropy-port)
+ (let* ((drv (build-expression->derivation
+ store
+ "non-deterministic"
+ `(begin
+ (use-modules (rnrs io ports))
+ (let ((out (assoc-ref %outputs "out")))
+ (call-with-output-file
+ out
+ (lambda (port)
+ (display
+ (call-with-input-file
+ ,entropy
+ get-string-all)
+ port)))
+ #t))
+ #:guile-for-build
+ (package-derivation
+ store
+ %bootstrap-guile
+ (%current-system))))
+ (file (derivation->output-path drv)))
+ (and (build-things
+ store
+ (list (derivation-file-name drv)))
+ (begin
+ (write (random-text) entropy-port)
+ (force-output entropy-port)
+ (guard (c ((nix-protocol-error? c)
+ (pk 'determinism-exception c)
+ (and (not (zero? (nix-protocol-error-status c)))
+ (string-contains
+ (nix-protocol-error-message c)
+ "deterministic"))))
+ (build-things
+ store
+ (list (derivation-file-name drv))
+ (build-mode check))
+ #f))))))))
substitute: warning: authentication and authorization of substitutes disabled!
substitute: guix substitute: warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable
building path(s) `/home/pi/code/guix/test-tmp/store/ipn490fbdmbzck7jyih2x3gk0kfnrjmd-non-deterministic'
checking path(s) `/home/pi/code/guix/test-tmp/store/ipn490fbdmbzck7jyih2x3gk0kfnrjmd-non-deterministic'
warning: rewriting hashes in `/home/pi/code/guix/test-tmp/store/ipn490fbdmbzck7jyih2x3gk0kfnrjmd-non-deterministic'; cross fingers
;;; (determinism-exception #<condition &nix-protocol-error [message: "derivation `/home/pi/code/guix/test-tmp/store/m6ja3n9vn9h49nyywh6ffpx5app9wap1-non-deterministic.drv' may not be deterministic: output `/home/pi/code/guix/test-tmp/store/ipn490fbdmbzck7jyih2x3gk0kfnrjmd-non-deterministic' differs" status: 1] 3196870>)
actual-value: 83
result: PASS
test-name: build multiple times
location: /home/pi/code/guix/tests/store.scm:891
source:
+ (test-assert
+ "build multiple times"
+ (with-store
+ store
+ (set-build-options
+ store
+ #:rounds
+ 2
+ #:use-substitutes?
+ #f)
+ (call-with-temporary-output-file
+ (lambda (entropy entropy-port)
+ (write (random-text) entropy-port)
+ (force-output entropy-port)
+ (let* ((drv (build-expression->derivation
+ store
+ "non-deterministic"
+ `(begin
+ (use-modules (rnrs io ports))
+ (let ((out (assoc-ref %outputs "out")))
+ (call-with-output-file
+ out
+ (lambda (port)
+ (display
+ (call-with-input-file
+ ,entropy
+ get-string-all)
+ port)
+ (call-with-output-file
+ ,entropy
+ (lambda (port) (write 'foobar port)))))
+ #t))
+ #:guile-for-build
+ (package-derivation
+ store
+ %bootstrap-guile
+ (%current-system))))
+ (file (derivation->output-path drv)))
+ (guard (c ((nix-protocol-error? c)
+ (pk 'multiple-build c)
+ (and (not (zero? (nix-protocol-error-status c)))
+ (string-contains
+ (nix-protocol-error-message c)
+ "deterministic"))))
+ (current-build-output-port (current-error-port))
+ (build-things
+ store
+ (list (derivation-file-name drv)))
+ #f))))))
@ build-started /home/pi/code/guix/test-tmp/store/qdwg4rlnrvwsa62vka1zr1h0jwzng7pm-non-deterministic.drv - armhf-linux /home/pi/code/guix/test-tmp/var/log/guix/drvs/qd//wg4rlnrvwsa62vka1zr1h0jwzng7pm-non-deterministic.drv.bz2
@ build-started /home/pi/code/guix/test-tmp/store/qdwg4rlnrvwsa62vka1zr1h0jwzng7pm-non-deterministic.drv - armhf-linux /home/pi/code/guix/test-tmp/var/log/guix/drvs/qd//wg4rlnrvwsa62vka1zr1h0jwzng7pm-non-deterministic.drv.bz2
output ‘/home/pi/code/guix/test-tmp/store/flq2c83khjdwy0xh6mhz51jdf0k63ha6-non-deterministic’ of ‘/home/pi/code/guix/test-tmp/store/qdwg4rlnrvwsa62vka1zr1h0jwzng7pm-non-deterministic.drv’ differs from previous round
@ build-failed /home/pi/code/guix/test-tmp/store/qdwg4rlnrvwsa62vka1zr1h0jwzng7pm-non-deterministic.drv - 1 output ‘/home/pi/code/guix/test-tmp/store/flq2c83khjdwy0xh6mhz51jdf0k63ha6-non-deterministic’ of ‘/home/pi/code/guix/test-tmp/store/qdwg4rlnrvwsa62vka1zr1h0jwzng7pm-non-deterministic.drv’ differs from previous round
;;; (multiple-build #<condition &nix-protocol-error [message: "build of `/home/pi/code/guix/test-tmp/store/qdwg4rlnrvwsa62vka1zr1h0jwzng7pm-non-deterministic.drv' failed" status: 1] 31a5bb8>)
actual-value: 81
result: PASS
test-name: store-lower
location: /home/pi/code/guix/tests/store.scm:929
source:
+ (test-equal
+ "store-lower"
+ "Lowered."
+ (let* ((add (store-lower text-file))
+ (file (add %store "foo" "Lowered.")))
+ (call-with-input-file file get-string-all)))
expected-value: "Lowered."
actual-value: "Lowered."
result: PASS
test-name: current-system
location: /home/pi/code/guix/tests/store.scm:935
source:
+ (test-equal
+ "current-system"
+ "bar"
+ (parameterize
+ ((%current-system "frob"))
+ (run-with-store
+ %store
+ (mbegin
+ %store-monad
+ (set-current-system "bar")
+ (current-system))
+ #:system
+ "foo")))
expected-value: "bar"
actual-value: "bar"
result: PASS
test-name: query-path-info
location: /home/pi/code/guix/tests/store.scm:944
source:
+ (test-assert
+ "query-path-info"
+ (let* ((ref (add-text-to-store %store "ref" "foo"))
+ (item (add-text-to-store
+ %store
+ "item"
+ "bar"
+ (list ref)))
+ (info (query-path-info %store item)))
+ (and (equal? (path-info-references info) (list ref))
+ (equal?
+ (path-info-hash info)
+ (sha256
+ (string->utf8
+ (call-with-output-string
+ (cut write-file item <>))))))))
actual-value: #t
result: PASS
test-name: path-info-deriver
location: /home/pi/code/guix/tests/store.scm:954
source:
+ (test-assert
+ "path-info-deriver"
+ (let* ((b (add-text-to-store
+ %store
+ "build"
+ "echo $foo > $out"
+ '()))
+ (s (add-to-store
+ %store
+ "bash"
+ #t
+ "sha256"
+ (search-bootstrap-binary
+ "bash"
+ (%current-system))))
+ (d (derivation
+ %store
+ "the-thing"
+ s
+ `("-e" ,b)
+ #:env-vars
+ `(("foo" unquote (random-text)))
+ #:inputs
+ `((,b) (,s))))
+ (o (derivation->output-path d)))
+ (and (build-derivations %store (list d))
+ (not (path-info-deriver (query-path-info %store b)))
+ (string=?
+ (derivation-file-name d)
+ (path-info-deriver (query-path-info %store o))))))
@ build-started /home/pi/code/guix/test-tmp/store/fn6qi7kswhcs0saqq8xw91pfrlad4jcs-the-thing.drv - armhf-linux /home/pi/code/guix/test-tmp/var/log/guix/drvs/fn//6qi7kswhcs0saqq8xw91pfrlad4jcs-the-thing.drv.bz2
@ build-succeeded /home/pi/code/guix/test-tmp/store/fn6qi7kswhcs0saqq8xw91pfrlad4jcs-the-thing.drv -
actual-value: #t
result: PASS
test-name: build-cores
location: /home/pi/code/guix/tests/store.scm:969
source:
+ (test-equal
+ "build-cores"
+ (list 0 42)
+ (with-store
+ store
+ (let* ((build (add-text-to-store
+ store
+ "build.sh"
+ "echo $NIX_BUILD_CORES > $out"))
+ (bash (add-to-store
+ store
+ "bash"
+ #t
+ "sha256"
+ (search-bootstrap-binary
+ "bash"
+ (%current-system))))
+ (drv1 (derivation
+ store
+ "the-thing"
+ bash
+ `("-e" ,build)
+ #:inputs
+ `((,bash) (,build))
+ #:env-vars
+ `(("x" unquote (random-text)))))
+ (drv2 (derivation
+ store
+ "the-thing"
+ bash
+ `("-e" ,build)
+ #:inputs
+ `((,bash) (,build))
+ #:env-vars
+ `(("x" unquote (random-text))))))
+ (and (build-derivations store (list drv1))
+ (begin
+ (set-build-options store #:build-cores 42)
+ (build-derivations store (list drv2)))
+ (list (call-with-input-file
+ (derivation->output-path drv1)
+ read)
+ (call-with-input-file
+ (derivation->output-path drv2)
+ read))))))
substitute: warning: authentication and authorization of substitutes disabled!
substitute: guix substitute: warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable
building path(s) `/home/pi/code/guix/test-tmp/store/4c052cp56wn1paxv3k0v808ambcxl5yd-the-thing'
@ build-started /home/pi/code/guix/test-tmp/store/p0lhbdc9z87gmcp0q54x40pkzx22icfd-the-thing.drv - armhf-linux /home/pi/code/guix/test-tmp/var/log/guix/drvs/p0//lhbdc9z87gmcp0q54x40pkzx22icfd-the-thing.drv.bz2
@ build-succeeded /home/pi/code/guix/test-tmp/store/p0lhbdc9z87gmcp0q54x40pkzx22icfd-the-thing.drv -
expected-value: (0 42)
actual-value: (0 42)
result: PASS
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-04-02 21:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-02 20:31 bug#31030: failing test-suite Martin Castillo
2018-04-02 21:49 ` Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.