======================================== GNU Guix UNKNOWN: ./test-suite.log ======================================== # TOTAL: 1990 # PASS: 1944 # SKIP: 44 # XFAIL: 1 # FAIL: 1 # XPASS: 0 # ERROR: 0 .. contents:: :depth: 2 SKIP: tests/channels ==================== test-name: channel-instance-metadata returns default if .guix-channel does not exist location: /home/daniel/guix/tests/channels.scm:117 source: + (test-equal + "channel-instance-metadata returns default if .guix-channel does not exist" + '("/" ()) + (let ((metadata + (channel-instance-metadata instance--boring))) + (list (channel-metadata-directory metadata) + (channel-metadata-dependencies metadata)))) expected-value: ("/" ()) actual-value: ("/" ()) result: PASS test-name: channel-instance-metadata and default dependencies location: /home/daniel/guix/tests/channels.scm:123 source: + (test-equal + "channel-instance-metadata and default dependencies" + '() + (channel-metadata-dependencies + (channel-instance-metadata instance--no-deps))) expected-value: () actual-value: () result: PASS test-name: channel-instance-metadata and directory location: /home/daniel/guix/tests/channels.scm:127 source: + (test-equal + "channel-instance-metadata and directory" + "/modules" + (channel-metadata-directory + (channel-instance-metadata + instance--sub-directory))) expected-value: "/modules" actual-value: "/modules" result: PASS test-name: channel-instance-metadata rejects unsupported version location: /home/daniel/guix/tests/channels.scm:132 source: + (test-equal + "channel-instance-metadata rejects unsupported version" + 1 + (guard (c ((and (message-condition? c) (error-location? c)) + (location-line (error-location c)))) + (channel-instance-metadata + instance--unsupported-version))) expected-value: 1 actual-value: 1 result: PASS test-name: channel-instance-metadata returns location: /home/daniel/guix/tests/channels.scm:138 source: + (test-assert + "channel-instance-metadata returns " + (every (@@ (guix channels) channel-metadata?) + (map channel-instance-metadata + (list instance--no-deps + instance--simple + instance--with-dupes)))) actual-value: #t result: PASS test-name: channel-instance-metadata dependencies are channels location: /home/daniel/guix/tests/channels.scm:145 source: + (test-assert + "channel-instance-metadata dependencies are channels" + (let ((deps ((@@ (guix channels) + channel-metadata-dependencies) + (channel-instance-metadata instance--simple)))) + (match deps (((? channel? dep)) #t) (_ #f)))) actual-value: #t result: PASS test-name: latest-channel-instances includes channel dependencies location: /home/daniel/guix/tests/channels.scm:152 source: + (test-assert + "latest-channel-instances includes channel dependencies" + (let* ((channel (channel (name 'test) (url "test"))) + (test-dir + (channel-instance-checkout instance--simple))) + (mock ((guix git) + update-cached-checkout + (lambda* (url #:key ref starting-commit) + (match url + ("test" (values test-dir "caf3cabba9e" #f)) + (_ (values + (channel-instance-checkout instance--no-deps) + "abcde1234" + #f))))) + (with-store + store + (let ((instances + (latest-channel-instances store (list channel)))) + (and (eq? 2 (length instances)) + (lset= eq? + '(test test-channel) + (map (compose + channel-name + channel-instance-channel) + instances)))))))) actual-value: #t result: PASS test-name: latest-channel-instances excludes duplicate channel dependencies location: /home/daniel/guix/tests/channels.scm:171 source: + (test-assert + "latest-channel-instances excludes duplicate channel dependencies" + (let* ((channel (channel (name 'test) (url "test"))) + (test-dir + (channel-instance-checkout instance--with-dupes))) + (mock ((guix git) + update-cached-checkout + (lambda* (url #:key ref starting-commit) + (match url + ("test" (values test-dir "caf3cabba9e" #f)) + (_ (values + (channel-instance-checkout instance--no-deps) + "abcde1234" + #f))))) + (with-store + store + (let ((instances + (latest-channel-instances store (list channel)))) + (and (= 2 (length instances)) + (lset= eq? + '(test test-channel) + (map (compose + channel-name + channel-instance-channel) + instances)) + (find (lambda (instance) + (and (eq? (channel-name + (channel-instance-channel instance)) + 'test-channel) + (string=? + (channel-commit + (channel-instance-channel instance)) + "abc1234"))) + instances))))))) actual-value: #< channel: #< name: test-channel url: "https://example.com/test-channel" branch: "master" commit: "abc1234" introduction: #f location: ((filename . "guix/channels.scm") (line . 261) (column . 19))> commit: "abcde1234" checkout: "/home/daniel/guix/test-tmp/store/k36vlcx69h7zsrik7dimnyvfwvgxnzi5-test-channel-abcde12"> result: PASS test-name: latest-channel-instances #:validate-pull location: /home/daniel/guix/tests/channels.scm:201 source: + (test-equal + "latest-channel-instances #:validate-pull" + 'descendant + (let/ec + return + (with-temporary-git-repository + directory + '((add "a.txt" "A") + (commit "first commit") + (add "b.scm" "#t") + (commit "second commit")) + (with-repository + directory + repository + (let* ((commit1 (find-commit repository "first")) + (commit2 (find-commit repository "second")) + (spec (channel + (url (string-append "file://" directory)) + (name 'foo))) + (new (channel + (inherit spec) + (commit (oid->string (commit-id commit2))))) + (old (channel + (inherit spec) + (commit (oid->string (commit-id commit1)))))) + (define (validate-pull channel current commit relation) + (return + (and (eq? channel old) + (string=? + (oid->string (commit-id commit2)) + current) + (string=? + (oid->string (commit-id commit1)) + commit) + relation))) + (with-store + store + (latest-channel-instances + store + (list old) + #:current-channels + (list new) + #:validate-pull + validate-pull))))))) result: SKIP test-name: channel-instances->manifest location: /home/daniel/guix/tests/channels.scm:234 source: + (test-assert + "channel-instances->manifest" + (let* ((spec (lambda deps + `(channel + (version 0) + (dependencies + ,@(map (lambda (dep) + `(channel + (name ,dep) + (url "http://example.org"))) + deps))))) + (guix (make-instance #:name 'guix)) + (instance0 (make-instance #:name 'a)) + (instance1 + (make-instance #:name 'b #:spec (spec 'a))) + (instance2 + (make-instance #:name 'c #:spec (spec 'b))) + (instance3 + (make-instance #:name 'd #:spec (spec 'c 'a)))) + (%graft? #f) + (let ((source (channel-instance-checkout guix))) + (mkdir (string-append source "/build-aux")) + (call-with-output-file + (string-append + source + "/build-aux/build-self.scm") + (lambda (port) + (write '(begin + (use-modules (guix) (gnu packages bootstrap)) + (lambda _ (package->derivation %bootstrap-guile))) + port)))) + (with-store + store + (let () + (define manifest + (run-with-store + store + (channel-instances->manifest + (list guix + instance0 + instance1 + instance2 + instance3)))) + (define entries (manifest-entries manifest)) + (define (depends? drv in out) + (let ((set (list->set + (requisites + store + (list (derivation-file-name drv))))) + (in (map derivation-file-name in)) + (out (map derivation-file-name out))) + (and (every (cut set-contains? set <>) in) + (not (any (cut set-contains? set <>) out))))) + (define (lookup name) + (run-with-store + store + (lower-object + (manifest-entry-item + (manifest-lookup + manifest + (manifest-pattern (name name))))))) + (let ((drv-guix (lookup "guix")) + (drv0 (lookup "a")) + (drv1 (lookup "b")) + (drv2 (lookup "c")) + (drv3 (lookup "d"))) + (and (depends? + drv-guix + '() + (list drv0 drv1 drv2 drv3)) + (depends? drv0 (list) (list drv1 drv2 drv3)) + (depends? drv1 (list drv0) (list drv2 drv3)) + (depends? drv2 (list drv1) (list drv3)) + (depends? drv3 (list drv2 drv0) (list)))))))) actual-value: #t result: PASS test-name: channel-news, no news location: /home/daniel/guix/tests/channels.scm:311 source: + (test-equal + "channel-news, no news" + '() + (with-temporary-git-repository + directory + '((add "a.txt" "A") (commit "the commit")) + (with-repository + directory + repository + (let ((channel + (channel + (url (string-append "file://" directory)) + (name 'foo))) + (latest (reference-name->oid repository "HEAD"))) + (channel-news-for-commit + channel + (oid->string latest)))))) result: SKIP test-name: channel-news, one entry location: /home/daniel/guix/tests/channels.scm:323 source: + (test-assert + "channel-news, one entry" + (with-temporary-git-repository + directory + `((add ".guix-channel" + ,(object->string + '(channel (version 0) (news-file "news.scm")))) + (commit "first commit") + (add "src/a.txt" "A") + (commit "second commit") + (tag "tag-for-first-news-entry") + (add "news.scm" + ,(lambda (repository) + (let ((previous + (reference-name->oid repository "HEAD"))) + (object->string + `(channel-news + (version 0) + (entry (commit ,(oid->string previous)) + (title (en "New file!") (eo "Nova dosiero!")) + (body (en "Yeah, a.txt.")))))))) + (commit "third commit") + (add "src/b.txt" "B") + (commit "fourth commit") + (add "news.scm" + ,(lambda (repository) + (let ((second + (commit-id + (find-commit repository "second commit"))) + (previous + (reference-name->oid repository "HEAD"))) + (object->string + `(channel-news + (version 0) + (entry (commit ,(oid->string previous)) + (title (en "Another file!")) + (body (en "Yeah, b.txt."))) + (entry (tag "tag-for-first-news-entry") + (title (en "Old news.") (eo "Malnova?oj.")) + (body (en "For a.txt")))))))) + (commit "fifth commit")) + (with-repository + directory + repository + (define (find-commit* message) + (oid->string + (commit-id (find-commit repository message)))) + (let ((channel + (channel + (url (string-append "file://" directory)) + (name 'foo))) + (commit1 (find-commit* "first commit")) + (commit2 (find-commit* "second commit")) + (commit3 (find-commit* "third commit")) + (commit4 (find-commit* "fourth commit")) + (commit5 (find-commit* "fifth commit"))) + (and (null? (channel-news-for-commit channel commit2)) + (lset= string=? + (map channel-news-entry-commit + (channel-news-for-commit channel commit5)) + (list commit2 commit4)) + (lset= equal? + (map channel-news-entry-title + (channel-news-for-commit channel commit5)) + '((("en" . "Another file!")) + (("en" . "Old news.") ("eo" . "Malnova?oj.")))) + (lset= string=? + (map channel-news-entry-commit + (channel-news-for-commit channel commit3)) + (list commit2)) + (lset= string=? + (map channel-news-entry-commit + (channel-news-for-commit channel commit3 commit1)) + (list commit2)) + (lset= string=? + (map channel-news-entry-commit + (channel-news-for-commit channel commit5 commit3)) + (list commit4)) + (lset= string=? + (map channel-news-entry-commit + (channel-news-for-commit channel commit5 commit1)) + (list commit4 commit2)) + (lset= equal? + (map channel-news-entry-tag + (channel-news-for-commit channel commit5 commit1)) + '(#f "tag-for-first-news-entry"))))))) result: SKIP test-name: channel-news, annotated tag location: /home/daniel/guix/tests/channels.scm:411 source: + (test-assert + "channel-news, annotated tag" + (with-temporary-git-repository + directory + `((add ".guix-channel" + ,(object->string + '(channel (version 0) (news-file "news.scm")))) + (add "src/a.txt" "A") + (commit "first commit") + (tag "tag-for-first-news-entry" + "This is an annotated tag.") + (add "news.scm" + ,(lambda (repository) + (let ((previous + (reference-name->oid repository "HEAD"))) + (object->string + `(channel-news + (version 0) + (entry (tag "tag-for-first-news-entry") + (title (en "New file!")) + (body (en "Yeah, a.txt.")))))))) + (commit "second commit")) + (with-repository + directory + repository + (define (find-commit* message) + (oid->string + (commit-id (find-commit repository message)))) + (let ((channel + (channel + (url (string-append "file://" directory)) + (name 'foo))) + (commit1 (find-commit* "first commit")) + (commit2 (find-commit* "second commit"))) + (and (null? (channel-news-for-commit channel commit1)) + (lset= equal? + (map channel-news-entry-title + (channel-news-for-commit channel commit2)) + '((("en" . "New file!")))) + (lset= string=? + (map channel-news-entry-tag + (channel-news-for-commit channel commit2)) + (list "tag-for-first-news-entry")) + (lset= string=? + (map channel-news-entry-commit + (channel-news-for-commit channel commit2)) + (list commit1))))))) result: SKIP test-name: latest-channel-instances, missing introduction for 'guix' location: /home/daniel/guix/tests/channels.scm:458 source: + (test-assert + "latest-channel-instances, missing introduction for 'guix'" + (with-temporary-git-repository + directory + '((add "a.txt" "A") + (commit "first commit") + (add "b.scm" "#t") + (commit "second commit")) + (with-repository + directory + repository + (let* ((commit1 (find-commit repository "first")) + (commit2 (find-commit repository "second")) + (channel + (channel + (url (string-append "file://" directory)) + (name 'guix)))) + (guard (c ((formatted-message? c) + (->bool + (string-contains + (formatted-message-string c) + "introduction")))) + (with-store + store + (latest-channel-instances store (list channel)) + #f)))))) result: SKIP test-name: authenticate-channel, wrong first commit signer location: /home/daniel/guix/tests/channels.scm:479 source: + (test-equal + "authenticate-channel, wrong first commit signer" + #t + (with-fresh-gnupg-setup + (list %ed25519-public-key-file + %ed25519-secret-key-file + %ed25519bis-public-key-file + %ed25519bis-secret-key-file) + (with-temporary-git-repository + directory + `((add ".guix-channel" + ,(object->string + '(channel + (version 0) + (keyring-reference "master")))) + (add ".guix-authorizations" + ,(object->string + `(authorizations + (version 0) + ((,(key-fingerprint %ed25519-public-key-file) + (name "Charlie")))))) + (add "signer.key" + ,(call-with-input-file + %ed25519-public-key-file + get-string-all)) + (commit + "first commit" + (signer + ,(key-fingerprint %ed25519-public-key-file))) + (add "random" ,(random-text)) + (commit + "second commit" + (signer + ,(key-fingerprint %ed25519-public-key-file)))) + (with-repository + directory + repository + (let* ((commit1 (find-commit repository "first")) + (commit2 (find-commit repository "second")) + (intro (make-channel-introduction + (commit-id-string commit1) + (openpgp-public-key-fingerprint + (read-openpgp-packet + %ed25519bis-public-key-file)))) + (channel + (channel + (name 'example) + (url (string-append "file://" directory)) + (introduction intro)))) + (guard (c ((formatted-message? c) + (and (string-contains + (formatted-message-string c) + "initial commit") + (equal? + (formatted-message-arguments c) + (list (oid->string (commit-id commit1)) + (key-fingerprint %ed25519-public-key-file) + (key-fingerprint + %ed25519bis-public-key-file)))))) + (authenticate-channel + channel + directory + (commit-id-string commit2) + #:keyring-reference-prefix + "") + 'failed)))))) result: SKIP test-name: authenticate-channel, .guix-authorizations location: /home/daniel/guix/tests/channels.scm:529 source: + (test-equal + "authenticate-channel, .guix-authorizations" + #t + (with-fresh-gnupg-setup + (list %ed25519-public-key-file + %ed25519-secret-key-file + %ed25519bis-public-key-file + %ed25519bis-secret-key-file) + (with-temporary-git-repository + directory + `((add ".guix-channel" + ,(object->string + '(channel + (version 0) + (keyring-reference "channel-keyring")))) + (add ".guix-authorizations" + ,(object->string + `(authorizations + (version 0) + ((,(key-fingerprint %ed25519-public-key-file) + (name "Charlie")))))) + (commit "zeroth commit") + (add "a.txt" "A") + (commit + "first commit" + (signer + ,(key-fingerprint %ed25519-public-key-file))) + (add "b.txt" "B") + (commit + "second commit" + (signer + ,(key-fingerprint %ed25519-public-key-file))) + (add "c.txt" "C") + (commit + "third commit" + (signer + ,(key-fingerprint %ed25519bis-public-key-file))) + (branch "channel-keyring") + (checkout "channel-keyring") + (add "signer.key" + ,(call-with-input-file + %ed25519-public-key-file + get-string-all)) + (add "other.key" + ,(call-with-input-file + %ed25519bis-public-key-file + get-string-all)) + (commit "keyring commit") + (checkout "master")) + (with-repository + directory + repository + (let* ((commit1 (find-commit repository "first")) + (commit2 (find-commit repository "second")) + (commit3 (find-commit repository "third")) + (intro (make-channel-introduction + (commit-id-string commit1) + (openpgp-public-key-fingerprint + (read-openpgp-packet %ed25519-public-key-file)))) + (channel + (channel + (name 'example) + (url (string-append "file://" directory)) + (introduction intro)))) + (and (authenticate-channel + channel + directory + (commit-id-string commit2) + #:keyring-reference-prefix + "") + (guard (c ((unauthorized-commit-error? c) + (and (oid=? (git-authentication-error-commit c) + (commit-id commit3)) + (bytevector=? + (openpgp-public-key-fingerprint + (unauthorized-commit-error-signing-key c)) + (openpgp-public-key-fingerprint + (read-openpgp-packet + %ed25519bis-public-key-file)))))) + (authenticate-channel + channel + directory + (commit-id-string commit3) + #:keyring-reference-prefix + "") + 'failed))))))) result: SKIP test-name: latest-channel-instances, authenticate dependency location: /home/daniel/guix/tests/channels.scm:598 source: + (test-equal + "latest-channel-instances, authenticate dependency" + #t + (with-fresh-gnupg-setup + (list %ed25519-public-key-file + %ed25519-secret-key-file) + (with-temporary-git-repository + dependency-directory + `((add ".guix-channel" + ,(object->string + '(channel + (version 0) + (keyring-reference "master")))) + (add ".guix-authorizations" + ,(object->string `(authorizations (version 0) ()))) + (add "signer.key" + ,(call-with-input-file + %ed25519-public-key-file + get-string-all)) + (commit + "zeroth commit" + (signer + ,(key-fingerprint %ed25519-public-key-file))) + (add "foo.txt" "evil") + (commit "unsigned commit")) + (with-repository + dependency-directory + dependency + (let* ((commit0 (find-commit dependency "zeroth")) + (commit1 (find-commit dependency "unsigned")) + (intro `(channel-introduction + (version 0) + (commit ,(commit-id-string commit0)) + (signer + ,(openpgp-format-fingerprint + (openpgp-public-key-fingerprint + (read-openpgp-packet + %ed25519-public-key-file))))))) + (with-temporary-git-repository + directory + `((add ".guix-channel" + ,(object->string + `(channel + (version 0) + (dependencies + (channel + (name test-channel) + (url ,dependency-directory) + (introduction ,intro)))))) + (commit "single commit")) + (let ((channel (channel (name 'test) (url directory)))) + (guard (c ((unsigned-commit-error? c) + (oid=? (git-authentication-error-commit c) + (commit-id commit1)))) + (with-store + store + (latest-channel-instances store (list channel)) + 'failed))))))))) result: SKIP Updating channel 'test' from Git repository at 'test'... Updating channel 'test-channel' from Git repository at 'https://example.com/test-channel'... Updating channel 'test' from Git repository at 'test'... Updating channel 'test-channel' from Git repository at 'https://example.com/test-channel'... Updating channel 'test-channel' from Git repository at 'https://example.com/test-channel'... SKIP: tests/cpio ================ test-name: file->cpio-header + write-cpio-header + read-cpio-header location: /home/daniel/guix/tests/cpio.scm:37 source: + (test-assert + "file->cpio-header + write-cpio-header + read-cpio-header" + (let* ((file (search-path %load-path "guix.scm")) + (header (file->cpio-header file))) + (call-with-values + (lambda () (open-bytevector-output-port)) + (lambda (port get-bv) + (write-cpio-header header port) + (let ((port (open-bytevector-input-port (get-bv)))) + (equal? header (read-cpio-header port))))))) actual-value: #t result: PASS test-name: bit-identical to GNU cpio's output location: /home/daniel/guix/tests/cpio.scm:49 source: + (test-assert + "bit-identical to GNU cpio's output" + (call-with-temporary-output-file + (lambda (link _) + (delete-file link) + (symlink "chbouib" link) + (let ((files (cons* "/" + (canonicalize-path + (dirname (search-path %load-path "guix.scm"))) + link + (map (compose + canonicalize-path + (cut search-path %load-path <>)) + '("guix.scm" + "guix/build/syscalls.scm" + "guix/packages.scm"))))) + (call-with-temporary-output-file + (lambda (ref-file _) + (let ((pipe (open-pipe* + OPEN_WRITE + %cpio-program + "-o" + "-O" + ref-file + "-H" + "newc" + "--null"))) + (for-each + (lambda (file) (format pipe "~a\x00" file)) + files) + (and (zero? (close-pipe pipe)) + (call-with-temporary-output-file + (lambda (file port) + (write-cpio-archive files port) + (close-port port) + (or (file=? ref-file file) + (throw 'cpio-archives-differ + files + ref-file + file + (stat:size (stat ref-file)) + (stat:size (stat file)))))))))))))) result: SKIP SKIP: tests/crate ================= test-name: guix-package->crate-name location: /home/daniel/guix/tests/crate.scm:326 source: + (test-equal + "guix-package->crate-name" + "rustc-serialize" + (guix-package->crate-name + (dummy-package + "rust-rustc-serialize" + (source + (dummy-origin + (uri (crate-uri "rustc-serialize" "1.0"))))))) expected-value: "rustc-serialize" actual-value: "rustc-serialize" result: PASS test-name: crate->guix-package location: /home/daniel/guix/tests/crate.scm:335 source: + (test-assert + "crate->guix-package" + (mock ((guix http-client) + http-fetch + (lambda (url . rest) + (match url + ("https://crates.io/api/v1/crates/foo" + (open-input-string test-foo-crate)) + ("https://crates.io/api/v1/crates/foo/1.0.3/download" + (set! test-source-hash + (bytevector->nix-base32-string + (sha256 + (string->bytevector "empty file\n" "utf-8")))) + (open-input-string "empty file\n")) + ("https://crates.io/api/v1/crates/foo/1.0.3/dependencies" + (open-input-string test-foo-dependencies)) + ("https://crates.io/api/v1/crates/leaf-alice" + (open-input-string test-leaf-alice-crate)) + ("https://crates.io/api/v1/crates/leaf-alice/0.7.5/download" + (set! test-source-hash + (bytevector->nix-base32-string + (sha256 + (string->bytevector "empty file\n" "utf-8")))) + (open-input-string "empty file\n")) + ("https://crates.io/api/v1/crates/leaf-alice/0.7.5/dependencies" + (open-input-string test-leaf-alice-dependencies)) + (_ (error "Unexpected URL: " url))))) + (match (crate->guix-package "foo") + ((define-public 'rust-foo-1 + (package + (name "rust-foo") + (version "1.0.3") + (source + (origin + (method url-fetch) + (uri (crate-uri "foo" 'version)) + (file-name + (string-append name "-" version ".tar.gz")) + (sha256 (base32 (? string? hash))))) + (build-system 'cargo-build-system) + (arguments + ('quasiquote + (#:skip-build? + #t + #:cargo-inputs + (("rust-leaf-alice" + ('unquote 'rust-leaf-alice-0.7)))))) + (home-page "http://example.com") + (synopsis "summary") + (description "summary") + (license (list license:expat license:asl2.0)))) + (string=? test-source-hash hash)) + (x (pk 'fail x #f))))) result: SKIP test-name: cargo-recursive-import location: /home/daniel/guix/tests/crate.scm:388 source: + (test-assert + "cargo-recursive-import" + (mock ((guix http-client) + http-fetch + (lambda (url . rest) + (match url + ("https://crates.io/api/v1/crates/root" + (open-input-string test-root-crate)) + ("https://crates.io/api/v1/crates/root/1.0.4/download" + (set! test-source-hash + (bytevector->nix-base32-string + (sha256 + (string->bytevector "empty file\n" "utf-8")))) + (open-input-string "empty file\n")) + ("https://crates.io/api/v1/crates/root/1.0.4/dependencies" + (open-input-string test-root-dependencies)) + ("https://crates.io/api/v1/crates/intermediate-a" + (open-input-string test-intermediate-a-crate)) + ("https://crates.io/api/v1/crates/intermediate-a/1.0.42/download" + (set! test-source-hash + (bytevector->nix-base32-string + (sha256 + (string->bytevector "empty file\n" "utf-8")))) + (open-input-string "empty file\n")) + ("https://crates.io/api/v1/crates/intermediate-a/1.0.42/dependencies" + (open-input-string + test-intermediate-a-dependencies)) + ("https://crates.io/api/v1/crates/intermediate-b" + (open-input-string test-intermediate-b-crate)) + ("https://crates.io/api/v1/crates/intermediate-b/1.2.3/download" + (set! test-source-hash + (bytevector->nix-base32-string + (sha256 + (string->bytevector "empty file\n" "utf-8")))) + (open-input-string "empty file\n")) + ("https://crates.io/api/v1/crates/intermediate-b/1.2.3/dependencies" + (open-input-string + test-intermediate-b-dependencies)) + ("https://crates.io/api/v1/crates/leaf-alice" + (open-input-string test-leaf-alice-crate)) + ("https://crates.io/api/v1/crates/leaf-alice/0.7.5/download" + (set! test-source-hash + (bytevector->nix-base32-string + (sha256 + (string->bytevector "empty file\n" "utf-8")))) + (open-input-string "empty file\n")) + ("https://crates.io/api/v1/crates/leaf-alice/0.7.5/dependencies" + (open-input-string test-leaf-alice-dependencies)) + ("https://crates.io/api/v1/crates/leaf-bob" + (open-input-string test-leaf-bob-crate)) + ("https://crates.io/api/v1/crates/leaf-bob/3.0.1/download" + (set! test-source-hash + (bytevector->nix-base32-string + (sha256 + (string->bytevector "empty file\n" "utf-8")))) + (open-input-string "empty file\n")) + ("https://crates.io/api/v1/crates/leaf-bob/3.0.1/dependencies" + (open-input-string test-leaf-bob-dependencies)) + (_ (error "Unexpected URL: " url))))) + (match (crate-recursive-import "root") + (((define-public 'rust-leaf-alice-0.7 + (package + (name "rust-leaf-alice") + (version "0.7.5") + (source + (origin + (method url-fetch) + (uri (crate-uri "leaf-alice" version)) + (file-name + (string-append name "-" version ".tar.gz")) + (sha256 (base32 (? string? hash))))) + (build-system cargo-build-system) + (arguments ('quasiquote (#:skip-build? #t))) + (home-page "http://example.com") + (synopsis "summary") + (description "summary") + (license (list license:expat license:asl2.0)))) + (define-public 'rust-leaf-bob-3 + (package + (name "rust-leaf-bob") + (version "3.0.1") + (source + (origin + (method url-fetch) + (uri (crate-uri "leaf-bob" version)) + (file-name + (string-append name "-" version ".tar.gz")) + (sha256 (base32 (? string? hash))))) + (build-system cargo-build-system) + (arguments ('quasiquote (#:skip-build? #t))) + (home-page "http://example.com") + (synopsis "summary") + (description "summary") + (license (list license:expat license:asl2.0)))) + (define-public 'rust-intermediate-b-1 + (package + (name "rust-intermediate-b") + (version "1.2.3") + (source + (origin + (method url-fetch) + (uri (crate-uri "intermediate-b" version)) + (file-name + (string-append name "-" version ".tar.gz")) + (sha256 (base32 (? string? hash))))) + (build-system cargo-build-system) + (arguments + ('quasiquote + (#:skip-build? + #t + #:cargo-inputs + (("rust-leaf-bob" ('unquote rust-leaf-bob-3)))))) + (home-page "http://example.com") + (synopsis "summary") + (description "summary") + (license (list license:expat license:asl2.0)))) + (define-public 'rust-intermediate-a-1 + (package + (name "rust-intermediate-a") + (version "1.0.42") + (source + (origin + (method url-fetch) + (uri (crate-uri "intermediate-a" version)) + (file-name + (string-append name "-" version ".tar.gz")) + (sha256 (base32 (? string? hash))))) + (build-system cargo-build-system) + (arguments + ('quasiquote + (#:skip-build? + #t + #:cargo-inputs + (("rust-intermediate-b" + ('unquote rust-intermediate-b-1)) + ("rust-leaf-alice" + ('unquote 'rust-leaf-alice-0.7)) + ("rust-leaf-bob" ('unquote rust-leaf-bob-3)))))) + (home-page "http://example.com") + (synopsis "summary") + (description "summary") + (license (list license:expat license:asl2.0)))) + (define-public 'rust-root-1 + (package + (name "rust-root") + (version "1.0.4") + (source + (origin + (method url-fetch) + (uri (crate-uri "root" version)) + (file-name + (string-append name "-" version ".tar.gz")) + (sha256 (base32 (? string? hash))))) + (build-system cargo-build-system) + (arguments + ('quasiquote + (#:cargo-inputs + (("rust-intermediate-a" + ('unquote rust-intermediate-a-1)) + ("rust-intermediate-b" + ('unquote rust-intermediate-b-1)) + ("rust-leaf-alice" + ('unquote 'rust-leaf-alice-0.7)) + ("rust-leaf-bob" ('unquote rust-leaf-bob-3)))))) + (home-page "http://example.com") + (synopsis "summary") + (description "summary") + (license (list license:expat license:asl2.0))))) + #t) + (x (pk 'fail x #f))))) result: SKIP test-name: licenses: MIT OR Apache-2.0 location: /home/daniel/guix/tests/crate.scm:562 source: + (test-equal + "licenses: MIT OR Apache-2.0" + '(license:expat license:asl2.0) + (string->license "MIT OR Apache-2.0")) expected-value: (license:expat license:asl2.0) actual-value: (license:expat license:asl2.0) result: PASS test-name: licenses: Apache-2.0 / MIT location: /home/daniel/guix/tests/crate.scm:566 source: + (test-equal + "licenses: Apache-2.0 / MIT" + '(license:asl2.0 license:expat) + (string->license "Apache-2.0 / MIT")) expected-value: (license:asl2.0 license:expat) actual-value: (license:asl2.0 license:expat) result: PASS test-name: licenses: Apache-2.0 WITH LLVM-exception location: /home/daniel/guix/tests/crate.scm:570 source: + (test-equal + "licenses: Apache-2.0 WITH LLVM-exception" + '(license:asl2.0 unknown-license!) + (string->license + "Apache-2.0 WITH LLVM-exception")) expected-value: (license:asl2.0 unknown-license!) actual-value: (license:asl2.0 unknown-license!) result: PASS test-name: licenses: MIT/Apache-2.0 AND BSD-2-Clause location: /home/daniel/guix/tests/crate.scm:574 source: + (test-equal + "licenses: MIT/Apache-2.0 AND BSD-2-Clause" + '(license:expat license:asl2.0 unknown-license!) + (string->license + "MIT/Apache-2.0 AND BSD-2-Clause")) expected-value: (license:expat license:asl2.0 unknown-license!) actual-value: (license:expat license:asl2.0 unknown-license!) result: PASS test-name: licenses: MIT/Apache-2.0 location: /home/daniel/guix/tests/crate.scm:578 source: + (test-equal + "licenses: MIT/Apache-2.0" + '(license:expat license:asl2.0) + (string->license "MIT/Apache-2.0")) expected-value: (license:expat license:asl2.0) actual-value: (license:expat license:asl2.0) result: PASS test-name: self-test: rust-docopt 0.8.x is gone, please adjust the test case location: /home/daniel/guix/tests/crate.scm:619 source: + (test-assert + "self-test: rust-docopt 0.8.x is gone, please adjust the test case" + (not (null? (find-packages-by-name "rust-docopt" "0.8")))) actual-value: #t result: PASS test-name: cargo-recursive-import-hoors-existing-packages location: /home/daniel/guix/tests/crate.scm:623 source: + (test-assert + "cargo-recursive-import-hoors-existing-packages" + (mock ((guix http-client) + http-fetch + (lambda (url . rest) + (match url + ("https://crates.io/api/v1/crates/doctool" + (open-input-string test-doctool-crate)) + ("https://crates.io/api/v1/crates/doctool/2.2.2/download" + (set! test-source-hash + (bytevector->nix-base32-string + (sha256 + (string->bytevector "empty file\n" "utf-8")))) + (open-input-string "empty file\n")) + ("https://crates.io/api/v1/crates/doctool/2.2.2/dependencies" + (open-input-string test-doctool-dependencies)) + (_ (error "Unexpected URL: " url))))) + (match (crate-recursive-import "doctool") + (((define-public 'rust-doctool-2 + (package + (name "rust-doctool") + (version "2.2.2") + (source + (origin + (method url-fetch) + (uri (crate-uri "doctool" version)) + (file-name + (string-append name "-" version ".tar.gz")) + (sha256 (base32 (? string? hash))))) + (build-system cargo-build-system) + (arguments + ('quasiquote + (#:cargo-inputs + (("rust-docopt" ('unquote 'rust-docopt-0.8)))))) + (home-page "http://example.com") + (synopsis "summary") + (description "summary") + (license (list license:expat license:asl2.0))))) + #t) + (x (pk 'fail x #f))))) result: SKIP SKIP: tests/git =============== test-name: commit-difference, linear history location: /home/daniel/guix/tests/git.scm:34 source: + (test-assert + "commit-difference, linear history" + (with-temporary-git-repository + directory + '((add "a.txt" "A") + (commit "first commit") + (add "b.txt" "B") + (commit "second commit") + (add "c.txt" "C") + (commit "third commit") + (add "d.txt" "D") + (commit "fourth commit")) + (with-repository + directory + repository + (let ((commit1 (find-commit repository "first")) + (commit2 (find-commit repository "second")) + (commit3 (find-commit repository "third")) + (commit4 (find-commit repository "fourth"))) + (and (lset= eq? + (commit-difference commit4 commit1) + (list commit2 commit3 commit4)) + (lset= eq? + (commit-difference commit4 commit2) + (list commit3 commit4)) + (equal? + (commit-difference commit3 commit2) + (list commit3)) + (null? (commit-difference commit1 commit4))))))) result: SKIP test-name: commit-difference, fork location: /home/daniel/guix/tests/git.scm:61 source: + (test-assert + "commit-difference, fork" + (with-temporary-git-repository + directory + '((add "a.txt" "A") + (commit "first commit") + (branch "devel") + (checkout "devel") + (add "devel/1.txt" "1") + (commit "first devel commit") + (add "devel/2.txt" "2") + (commit "second devel commit") + (checkout "master") + (add "b.txt" "B") + (commit "second commit") + (add "c.txt" "C") + (commit "third commit") + (merge "devel" "merge") + (add "d.txt" "D") + (commit "fourth commit")) + (with-repository + directory + repository + (let ((master1 (find-commit repository "first commit")) + (master2 + (find-commit repository "second commit")) + (master3 (find-commit repository "third commit")) + (master4 + (find-commit repository "fourth commit")) + (devel1 (find-commit repository "first devel")) + (devel2 (find-commit repository "second devel")) + (merge (find-commit repository "merge"))) + (and (equal? + (commit-difference master4 merge) + (list master4)) + (lset= eq? + (commit-difference master3 master1) + (list master3 master2)) + (lset= eq? + (commit-difference devel2 master1) + (list devel2 devel1)) + (lset= eq? + (commit-difference master4 master2) + (list master4 merge master3 devel1 devel2))))))) result: SKIP test-name: commit-difference, excluded commits location: /home/daniel/guix/tests/git.scm:101 source: + (test-assert + "commit-difference, excluded commits" + (with-temporary-git-repository + directory + '((add "a.txt" "A") + (commit "first commit") + (add "b.txt" "B") + (commit "second commit") + (add "c.txt" "C") + (commit "third commit") + (add "d.txt" "D") + (commit "fourth commit") + (add "e.txt" "E") + (commit "fifth commit")) + (with-repository + directory + repository + (let ((commit1 (find-commit repository "first")) + (commit2 (find-commit repository "second")) + (commit3 (find-commit repository "third")) + (commit4 (find-commit repository "fourth")) + (commit5 (find-commit repository "fifth"))) + (and (lset= eq? + (commit-difference + commit4 + commit1 + (list commit2)) + (list commit3 commit4)) + (lset= eq? + (commit-difference + commit4 + commit1 + (list commit3)) + (list commit4)) + (null? (commit-difference + commit4 + commit1 + (list commit5)))))))) result: SKIP test-name: commit-relation location: /home/daniel/guix/tests/git.scm:126 source: + (test-equal + "commit-relation" + '(self ancestor + descendant + unrelated + unrelated + ancestor + descendant + ancestor + descendant) + (with-temporary-git-repository + directory + '((add "a.txt" "A") + (commit "first commit") + (branch "hack") + (checkout "hack") + (add "1.txt" "1") + (commit "branch commit") + (checkout "master") + (add "b.txt" "B") + (commit "second commit") + (add "c.txt" "C") + (commit "third commit") + (merge "hack" "merge")) + (with-repository + directory + repository + (let ((master1 (find-commit repository "first")) + (master2 (find-commit repository "second")) + (master3 (find-commit repository "third")) + (branch1 (find-commit repository "branch")) + (merge (find-commit repository "merge"))) + (list (commit-relation master3 master3) + (commit-relation master1 master3) + (commit-relation master3 master1) + (commit-relation master2 branch1) + (commit-relation branch1 master2) + (commit-relation branch1 merge) + (commit-relation merge branch1) + (commit-relation master1 merge) + (commit-relation merge master1)))))) result: SKIP test-name: remote-refs location: /home/daniel/guix/tests/git.scm:166 source: + (test-equal + "remote-refs" + '("refs/heads/develop" + "refs/heads/master" + "refs/tags/v1.0" + "refs/tags/v1.1") + (with-temporary-git-repository + directory + '((add "a.txt" "A") + (commit "First commit") + (tag "v1.0" "release-1.0") + (branch "develop") + (checkout "develop") + (add "b.txt" "B") + (commit "Second commit") + (tag "v1.1" "release-1.1")) + (remote-refs directory))) result: SKIP test-name: remote-refs: only tags location: /home/daniel/guix/tests/git.scm:181 source: + (test-equal + "remote-refs: only tags" + '("refs/tags/v1.0" "refs/tags/v1.1") + (with-temporary-git-repository + directory + '((add "a.txt" "A") + (commit "First commit") + (tag "v1.0" "Release 1.0") + (add "b.txt" "B") + (commit "Second commit") + (tag "v1.1" "Release 1.1")) + (remote-refs directory #:tags? #t))) result: SKIP SKIP: tests/git-authenticate ============================ test-name: unsigned commits location: /home/daniel/guix/tests/git-authenticate.scm:43 source: + (test-assert + "unsigned commits" + (with-temporary-git-repository + directory + '((add "a.txt" "A") + (commit "first commit") + (add "b.txt" "B") + (commit "second commit")) + (with-repository + directory + repository + (let ((commit1 (find-commit repository "first")) + (commit2 (find-commit repository "second"))) + (guard (c ((unsigned-commit-error? c) + (oid=? (git-authentication-error-commit c) + (commit-id commit1)))) + (authenticate-commits + repository + (list commit1 commit2) + #:keyring-reference + "master") + 'failed))))) result: SKIP test-name: signed commits, SHA1 signature location: /home/daniel/guix/tests/git-authenticate.scm:60 source: + (test-assert + "signed commits, SHA1 signature" + (with-fresh-gnupg-setup + (list %ed25519-public-key-file + %ed25519-secret-key-file) + (call-with-output-file + (string-append (getenv "GNUPGHOME") "/gpg.conf") + (lambda (port) (display "digest-algo sha1" port))) + (with-temporary-git-repository + directory + `((add "a.txt" "A") + (add "signer.key" + ,(call-with-input-file + %ed25519-public-key-file + get-string-all)) + (add ".guix-authorizations" + ,(object->string + `(authorizations + (version 0) + ((,(key-fingerprint %ed25519-public-key-file) + (name "Charlie")))))) + (commit + "first commit" + (signer + ,(key-fingerprint %ed25519-public-key-file)))) + (with-repository + directory + repository + (let ((commit (find-commit repository "first"))) + (guard (c ((unsigned-commit-error? c) + (oid=? (git-authentication-error-commit c) + (commit-id commit)))) + (authenticate-commits + repository + (list commit) + #:keyring-reference + "master") + 'failed)))))) result: SKIP test-name: signed commits, default authorizations location: /home/daniel/guix/tests/git-authenticate.scm:89 source: + (test-assert + "signed commits, default authorizations" + (with-fresh-gnupg-setup + (list %ed25519-public-key-file + %ed25519-secret-key-file) + (with-temporary-git-repository + directory + `((add "signer.key" + ,(call-with-input-file + %ed25519-public-key-file + get-string-all)) + (commit "zeroth commit") + (add "a.txt" "A") + (commit + "first commit" + (signer + ,(key-fingerprint %ed25519-public-key-file))) + (add "b.txt" "B") + (commit + "second commit" + (signer + ,(key-fingerprint %ed25519-public-key-file)))) + (with-repository + directory + repository + (let ((commit1 (find-commit repository "first")) + (commit2 (find-commit repository "second"))) + (authenticate-commits + repository + (list commit1 commit2) + #:default-authorizations + (list (openpgp-public-key-fingerprint + (read-openpgp-packet %ed25519-public-key-file))) + #:keyring-reference + "master")))))) result: SKIP test-name: signed commits, .guix-authorizations location: /home/daniel/guix/tests/git-authenticate.scm:113 source: + (test-assert + "signed commits, .guix-authorizations" + (with-fresh-gnupg-setup + (list %ed25519-public-key-file + %ed25519-secret-key-file) + (with-temporary-git-repository + directory + `((add "signer.key" + ,(call-with-input-file + %ed25519-public-key-file + get-string-all)) + (add ".guix-authorizations" + ,(object->string + `(authorizations + (version 0) + ((,(key-fingerprint %ed25519-public-key-file) + (name "Charlie")))))) + (commit "zeroth commit") + (add "a.txt" "A") + (commit + "first commit" + (signer + ,(key-fingerprint %ed25519-public-key-file))) + (add ".guix-authorizations" + ,(object->string `(authorizations (version 0) ()))) + (commit + "second commit" + (signer + ,(key-fingerprint %ed25519-public-key-file))) + (add "b.txt" "B") + (commit + "third commit" + (signer + ,(key-fingerprint %ed25519-public-key-file)))) + (with-repository + directory + repository + (let ((commit1 (find-commit repository "first")) + (commit2 (find-commit repository "second")) + (commit3 (find-commit repository "third"))) + (and (authenticate-commits + repository + (list commit1 commit2) + #:keyring-reference + "master") + (guard (c ((unauthorized-commit-error? c) + (and (oid=? (git-authentication-error-commit c) + (commit-id commit3)) + (bytevector=? + (openpgp-public-key-fingerprint + (unauthorized-commit-error-signing-key c)) + (openpgp-public-key-fingerprint + (read-openpgp-packet + %ed25519-public-key-file)))))) + (authenticate-commits + repository + (list commit1 commit2 commit3) + #:keyring-reference + "master") + 'failed))))))) result: SKIP test-name: signed commits, .guix-authorizations, unauthorized merge location: /home/daniel/guix/tests/git-authenticate.scm:161 source: + (test-assert + "signed commits, .guix-authorizations, unauthorized merge" + (with-fresh-gnupg-setup + (list %ed25519-public-key-file + %ed25519-secret-key-file + %ed25519bis-public-key-file + %ed25519bis-secret-key-file) + (with-temporary-git-repository + directory + `((add "signer1.key" + ,(call-with-input-file + %ed25519-public-key-file + get-string-all)) + (add "signer2.key" + ,(call-with-input-file + %ed25519bis-public-key-file + get-string-all)) + (add ".guix-authorizations" + ,(object->string + `(authorizations + (version 0) + ((,(key-fingerprint %ed25519-public-key-file) + (name "Alice")))))) + (commit "zeroth commit") + (add "a.txt" "A") + (commit + "first commit" + (signer + ,(key-fingerprint %ed25519-public-key-file))) + (branch "devel") + (checkout "devel") + (add "devel/1.txt" "1") + (commit + "first devel commit" + (signer + ,(key-fingerprint %ed25519bis-public-key-file))) + (checkout "master") + (add "b.txt" "B") + (commit + "second commit" + (signer + ,(key-fingerprint %ed25519-public-key-file))) + (merge "devel" + "merge" + (signer + ,(key-fingerprint %ed25519-public-key-file)))) + (with-repository + directory + repository + (let ((master1 (find-commit repository "first commit")) + (master2 + (find-commit repository "second commit")) + (devel1 + (find-commit repository "first devel commit")) + (merge (find-commit repository "merge"))) + (define (correct? c commit) + (and (oid=? (git-authentication-error-commit c) + (commit-id commit)) + (bytevector=? + (openpgp-public-key-fingerprint + (unauthorized-commit-error-signing-key c)) + (openpgp-public-key-fingerprint + (read-openpgp-packet %ed25519bis-public-key-file))))) + (and (authenticate-commits + repository + (list master1 master2) + #:keyring-reference + "master") + (guard (c ((unauthorized-commit-error? c) + (correct? c devel1))) + (authenticate-commits + repository + (list master1 devel1) + #:keyring-reference + "master") + #f) + (guard (c ((unauthorized-commit-error? c) + (correct? c devel1))) + (authenticate-commits + repository + (list master1 master2 devel1 merge) + #:keyring-reference + "master") + #f))))))) result: SKIP test-name: signed commits, .guix-authorizations, authorized merge location: /home/daniel/guix/tests/git-authenticate.scm:230 source: + (test-assert + "signed commits, .guix-authorizations, authorized merge" + (with-fresh-gnupg-setup + (list %ed25519-public-key-file + %ed25519-secret-key-file + %ed25519bis-public-key-file + %ed25519bis-secret-key-file) + (with-temporary-git-repository + directory + `((add "signer1.key" + ,(call-with-input-file + %ed25519-public-key-file + get-string-all)) + (add "signer2.key" + ,(call-with-input-file + %ed25519bis-public-key-file + get-string-all)) + (add ".guix-authorizations" + ,(object->string + `(authorizations + (version 0) + ((,(key-fingerprint %ed25519-public-key-file) + (name "Alice")))))) + (commit "zeroth commit") + (add "a.txt" "A") + (commit + "first commit" + (signer + ,(key-fingerprint %ed25519-public-key-file))) + (branch "devel") + (checkout "devel") + (add ".guix-authorizations" + ,(object->string + `(authorizations + (version 0) + ((,(key-fingerprint %ed25519-public-key-file) + (name "Alice")) + (,(key-fingerprint %ed25519bis-public-key-file)))))) + (commit + "first devel commit" + (signer + ,(key-fingerprint %ed25519-public-key-file))) + (add "devel/2.txt" "2") + (commit + "second devel commit" + (signer + ,(key-fingerprint %ed25519bis-public-key-file))) + (checkout "master") + (add "b.txt" "B") + (commit + "second commit" + (signer + ,(key-fingerprint %ed25519-public-key-file))) + (merge "devel" + "merge" + (signer + ,(key-fingerprint %ed25519-public-key-file))) + (add "c.txt" "C") + (commit + "third commit" + (signer + ,(key-fingerprint %ed25519bis-public-key-file)))) + (with-repository + directory + repository + (let ((master1 (find-commit repository "first commit")) + (master2 + (find-commit repository "second commit")) + (devel1 + (find-commit repository "first devel commit")) + (devel2 + (find-commit repository "second devel commit")) + (merge (find-commit repository "merge")) + (master3 (find-commit repository "third commit"))) + (authenticate-commits + repository + (list master1 + master2 + devel1 + devel2 + merge + master3) + #:keyring-reference + "master")))))) result: SKIP test-name: signed commits, .guix-authorizations removed location: /home/daniel/guix/tests/git-authenticate.scm:290 source: + (test-assert + "signed commits, .guix-authorizations removed" + (with-fresh-gnupg-setup + (list %ed25519-public-key-file + %ed25519-secret-key-file) + (with-temporary-git-repository + directory + `((add "signer.key" + ,(call-with-input-file + %ed25519-public-key-file + get-string-all)) + (add ".guix-authorizations" + ,(object->string + `(authorizations + (version 0) + ((,(key-fingerprint %ed25519-public-key-file) + (name "Charlie")))))) + (commit "zeroth commit") + (add "a.txt" "A") + (commit + "first commit" + (signer + ,(key-fingerprint %ed25519-public-key-file))) + (remove ".guix-authorizations") + (commit + "second commit" + (signer + ,(key-fingerprint %ed25519-public-key-file))) + (add "b.txt" "B") + (commit + "third commit" + (signer + ,(key-fingerprint %ed25519-public-key-file)))) + (with-repository + directory + repository + (let ((commit1 (find-commit repository "first")) + (commit2 (find-commit repository "second")) + (commit3 (find-commit repository "third"))) + (and (authenticate-commits + repository + (list commit1 commit2) + #:keyring-reference + "master") + (guard (c ((unauthorized-commit-error? c) + (oid=? (git-authentication-error-commit c) + (commit-id commit2)))) + (authenticate-commits + repository + (list commit1 commit2 commit3) + #:keyring-reference + "master") + 'failed))))))) result: SKIP SKIP: tests/hackage =================== Starting download of /tmp/guix-file.R4iq0I From https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz... download failed "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "Not Found" Starting download of /tmp/guix-file.R4iq0I From https://web.archive.org/web/20210928165851/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz... download failed "https://web.archive.org/web/20210928165851/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "NOT FOUND" Trying to use Disarchive to assemble /tmp/guix-file.R4iq0I... could not find its Disarchive specification failed to download "/tmp/guix-file.R4iq0I" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" test-name: hackage->guix-package test 1 location: /home/daniel/guix/tests/hackage.scm:193 source: + (test-assert + "hackage->guix-package test 1" + (eval-test-with-cabal test-cabal-1 match-ghc-foo)) actual-value: #t result: PASS Starting download of /tmp/guix-file.zWXh5I From https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz... download failed "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "Not Found" Starting download of /tmp/guix-file.zWXh5I From https://web.archive.org/web/20210928165853/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz... download failed "https://web.archive.org/web/20210928165853/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "NOT FOUND" Trying to use Disarchive to assemble /tmp/guix-file.zWXh5I... could not find its Disarchive specification failed to download "/tmp/guix-file.zWXh5I" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" test-name: hackage->guix-package test 2 location: /home/daniel/guix/tests/hackage.scm:196 source: + (test-assert + "hackage->guix-package test 2" + (eval-test-with-cabal test-cabal-2 match-ghc-foo)) actual-value: #t result: PASS Starting download of /tmp/guix-file.kdBX2H From https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz... download failed "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "Not Found" Starting download of /tmp/guix-file.kdBX2H From https://web.archive.org/web/20210928165855/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz... download failed "https://web.archive.org/web/20210928165855/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "NOT FOUND" Trying to use Disarchive to assemble /tmp/guix-file.kdBX2H... could not find its Disarchive specification failed to download "/tmp/guix-file.kdBX2H" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" test-name: hackage->guix-package test 3 location: /home/daniel/guix/tests/hackage.scm:199 source: + (test-assert + "hackage->guix-package test 3" + (eval-test-with-cabal + test-cabal-3 + match-ghc-foo + #:cabal-environment + '(("impl" . "ghc-7.8")))) actual-value: #t result: PASS Starting download of /tmp/guix-file.zzW7uJ From https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz... download failed "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "Not Found" Starting download of /tmp/guix-file.zzW7uJ From https://web.archive.org/web/20210928165856/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz... download failed "https://web.archive.org/web/20210928165856/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "NOT FOUND" Trying to use Disarchive to assemble /tmp/guix-file.zzW7uJ... could not find its Disarchive specification failed to download "/tmp/guix-file.zzW7uJ" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" test-name: hackage->guix-package test 4 location: /home/daniel/guix/tests/hackage.scm:203 source: + (test-assert + "hackage->guix-package test 4" + (eval-test-with-cabal + test-cabal-4 + match-ghc-foo + #:cabal-environment + '(("impl" . "ghc-7.8")))) actual-value: #t result: PASS Starting download of /tmp/guix-file.Ic5lPH From https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz... download failed "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "Not Found" Starting download of /tmp/guix-file.Ic5lPH From https://web.archive.org/web/20210928165857/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz... download failed "https://web.archive.org/web/20210928165857/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "NOT FOUND" Trying to use Disarchive to assemble /tmp/guix-file.Ic5lPH... could not find its Disarchive specification failed to download "/tmp/guix-file.Ic5lPH" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" test-name: hackage->guix-package test 5 location: /home/daniel/guix/tests/hackage.scm:207 source: + (test-assert + "hackage->guix-package test 5" + (eval-test-with-cabal + test-cabal-5 + match-ghc-foo + #:cabal-environment + '(("impl" . "ghc-7.8")))) actual-value: #t result: PASS Starting download of /tmp/guix-file.x63KWJ From https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz... download failed "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "Not Found" Starting download of /tmp/guix-file.x63KWJ From https://web.archive.org/web/20210928165858/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz... download failed "https://web.archive.org/web/20210928165858/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "NOT FOUND" Trying to use Disarchive to assemble /tmp/guix-file.x63KWJ... could not find its Disarchive specification failed to download "/tmp/guix-file.x63KWJ" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" test-name: hackage->guix-package test 6 location: /home/daniel/guix/tests/hackage.scm:238 source: + (test-assert + "hackage->guix-package test 6" + (eval-test-with-cabal + test-cabal-6 + match-ghc-foo-6)) actual-value: #t result: PASS Starting download of /tmp/guix-file.TSsEBK From https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz... download failed "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "Not Found" Starting download of /tmp/guix-file.TSsEBK From https://web.archive.org/web/20210928165901/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz... download failed "https://web.archive.org/web/20210928165901/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "NOT FOUND" Trying to use Disarchive to assemble /tmp/guix-file.TSsEBK... could not find its Disarchive specification failed to download "/tmp/guix-file.TSsEBK" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" test-name: hackage->guix-package test multiline desc (layout) location: /home/daniel/guix/tests/hackage.scm:256 source: + (test-assert + "hackage->guix-package test multiline desc (layout)" + (eval-test-with-cabal + test-cabal-multiline-layout + match-ghc-foo)) actual-value: #t result: PASS Starting download of /tmp/guix-file.KpifvH From https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz... download failed "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "Not Found" Starting download of /tmp/guix-file.KpifvH From https://web.archive.org/web/20210928165903/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz... download failed "https://web.archive.org/web/20210928165903/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "NOT FOUND" Trying to use Disarchive to assemble /tmp/guix-file.KpifvH... could not find its Disarchive specification failed to download "/tmp/guix-file.KpifvH" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" test-name: hackage->guix-package test multiline desc (braced) location: /home/daniel/guix/tests/hackage.scm:276 source: + (test-assert + "hackage->guix-package test multiline desc (braced)" + (eval-test-with-cabal + test-cabal-multiline-braced + match-ghc-foo)) actual-value: #t result: PASS Syntax error: unexpected token : (ghc-options (-Wall)) (at line 11, column 2) Syntax error: unexpected end of input ;;; (fail #f #f) test-name: hackage->guix-package test mixed layout location: /home/daniel/guix/tests/hackage.scm:296 source: + (test-assert + "hackage->guix-package test mixed layout" + (eval-test-with-cabal + test-cabal-mixed-layout + match-ghc-foo)) actual-value: #f result: XFAIL Starting download of /tmp/guix-file.itjTLH From https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz... download failed "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "Not Found" Starting download of /tmp/guix-file.itjTLH From https://web.archive.org/web/20210928165904/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz... download failed "https://web.archive.org/web/20210928165904/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "NOT FOUND" Trying to use Disarchive to assemble /tmp/guix-file.itjTLH... could not find its Disarchive specification failed to download "/tmp/guix-file.itjTLH" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" test-name: hackage->guix-package test flag executable location: /home/daniel/guix/tests/hackage.scm:321 source: + (test-assert + "hackage->guix-package test flag executable" + (eval-test-with-cabal + test-cabal-flag-executable + match-ghc-foo)) actual-value: #t result: PASS Starting download of /tmp/guix-file.l8Q3RH From https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz... download failed "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "Not Found" Starting download of /tmp/guix-file.l8Q3RH From https://web.archive.org/web/20210928165905/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz... download failed "https://web.archive.org/web/20210928165905/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "NOT FOUND" Trying to use Disarchive to assemble /tmp/guix-file.l8Q3RH... could not find its Disarchive specification failed to download "/tmp/guix-file.l8Q3RH" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" test-name: hackage->guix-package test cabal revision location: /home/daniel/guix/tests/hackage.scm:366 source: + (test-assert + "hackage->guix-package test cabal revision" + (eval-test-with-cabal + test-cabal-revision + match-ghc-foo-revision)) actual-value: #t result: PASS test-name: read-cabal test 1 location: /home/daniel/guix/tests/hackage.scm:369 source: + (test-assert + "read-cabal test 1" + (match (call-with-input-string + test-read-cabal-1 + read-cabal) + ((("name" ("test-me")) + ('section + 'library + (('if + ('flag "base4point8") + (("build-depends" ("base >= 4.8 && < 5"))) + (('if + ('flag "base4") + (("build-depends" ("base >= 4 && < 4.8"))) + (('if + ('flag "base3") + (("build-depends" ("base >= 3 && < 4"))) + (("build-depends" ("base < 3")))))))) + ('if + ('or + ('flag "base4point8") + ('and ('flag "base4") ('flag "base3"))) + (("build-depends" ("random"))) + ()) + ("build-depends" ("containers")) + ("exposed-modules" ("Test.QuickCheck.Exception"))))) + #t) + (x (pk 'fail x #f)))) actual-value: #t result: PASS Starting download of /tmp/guix-file.yJTb6G From https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz... download failed "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "Not Found" Starting download of /tmp/guix-file.yJTb6G From https://web.archive.org/web/20210928165909/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz... download failed "https://web.archive.org/web/20210928165909/https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" 404 "NOT FOUND" Trying to use Disarchive to assemble /tmp/guix-file.yJTb6G... could not find its Disarchive specification failed to download "/tmp/guix-file.yJTb6G" from "https://hackage.haskell.org/package/foo/foo-1.0.0.tar.gz" test-name: hackage->guix-package test cabal import location: /home/daniel/guix/tests/hackage.scm:428 source: + (test-assert + "hackage->guix-package test cabal import" + (eval-test-with-cabal + test-cabal-import + match-ghc-foo-import)) actual-value: #t result: PASS SKIP: tests/import-git ====================== test-name: latest-git-tag-version: no custom prefix, suffix, and delimiter location: /home/daniel/guix/tests/import-git.scm:50 source: + (test-equal + "latest-git-tag-version: no custom prefix, suffix, and delimiter" + "1.0.1" + (with-temporary-git-repository + directory + '((add "a.txt" "A") + (commit "First commit") + (tag "1.0.1" "Release 1.0.1")) + (let ((package (make-package directory "1.0.0"))) + (latest-git-tag-version package)))) result: SKIP test-name: latest-git-tag-version: custom prefix, no suffix and delimiter location: /home/daniel/guix/tests/import-git.scm:60 source: + (test-equal + "latest-git-tag-version: custom prefix, no suffix and delimiter" + "1.0.1" + (with-temporary-git-repository + directory + '((add "a.txt" "A") + (commit "First commit") + (tag "prefix-1.0.1" "Release 1.0.1")) + (let ((package + (make-package + directory + "1.0.0" + '((release-tag-prefix . "prefix-"))))) + (latest-git-tag-version package)))) result: SKIP test-name: latest-git-tag-version: custom suffix, no prefix and delimiter location: /home/daniel/guix/tests/import-git.scm:71 source: + (test-equal + "latest-git-tag-version: custom suffix, no prefix and delimiter" + "1.0.1" + (with-temporary-git-repository + directory + '((add "a.txt" "A") + (commit "First commit") + (tag "1.0.1-suffix-123" "Release 1.0.1")) + (let ((package + (make-package + directory + "1.0.0" + '((release-tag-suffix . "-suffix-[0-9]*"))))) + (latest-git-tag-version package)))) result: SKIP test-name: latest-git-tag-version: custom delimiter, no prefix and suffix location: /home/daniel/guix/tests/import-git.scm:82 source: + (test-equal + "latest-git-tag-version: custom delimiter, no prefix and suffix" + "2021.09.07" + (with-temporary-git-repository + directory + '((add "a.txt" "A") + (commit "First commit") + (tag "2021-09-07" "Release 2021-09-07")) + (let ((package + (make-package + directory + "2021-09-06" + '((release-tag-version-delimiter . "-"))))) + (latest-git-tag-version package)))) result: SKIP test-name: latest-git-tag-version: empty delimiter, no prefix and suffix location: /home/daniel/guix/tests/import-git.scm:93 source: + (test-equal + "latest-git-tag-version: empty delimiter, no prefix and suffix" + "20210907" + (with-temporary-git-repository + directory + '((add "a.txt" "A") + (commit "First commit") + (tag "20210907" "Release 20210907")) + (let ((package + (make-package + directory + "20210906" + '((release-tag-version-delimiter . ""))))) + (latest-git-tag-version package)))) result: SKIP test-name: latest-git-tag-version: custom prefix and suffix, no delimiter location: /home/daniel/guix/tests/import-git.scm:104 source: + (test-equal + "latest-git-tag-version: custom prefix and suffix, no delimiter" + "2.0.0" + (with-temporary-git-repository + directory + '((add "a.txt" "A") + (commit "First commit") + (tag "Release-2.0.0suffix-1" "Release 2.0.0")) + (let ((package + (make-package + directory + "1.0.0" + '((release-tag-prefix . "Release-") + (release-tag-suffix . "suffix-[0-9]"))))) + (latest-git-tag-version package)))) result: SKIP test-name: latest-git-tag-version: custom prefix, suffix, and delimiter location: /home/daniel/guix/tests/import-git.scm:116 source: + (test-equal + "latest-git-tag-version: custom prefix, suffix, and delimiter" + "2.0.0" + (with-temporary-git-repository + directory + '((add "a.txt" "A") + (commit "First commit") + (tag "Release-2_0_0suffix-1" "Release 2.0.0")) + (let ((package + (make-package + directory + "1.0.0" + '((release-tag-prefix . "Release-") + (release-tag-suffix . "suffix-[0-9]") + (release-tag-version-delimiter . "_"))))) + (latest-git-tag-version package)))) result: SKIP test-name: latest-git-tag-version: only pre-releases available location: /home/daniel/guix/tests/import-git.scm:129 source: + (test-equal + "latest-git-tag-version: only pre-releases available" + #f + (with-temporary-git-repository + directory + '((add "a.txt" "A") + (commit "First commit") + (tag "2.0.0-rc1" "Release candidate for 2.0.0")) + (let ((package (make-package directory "1.0.0"))) + (latest-git-tag-version package)))) result: SKIP test-name: latest-git-tag-version: accept pre-releases location: /home/daniel/guix/tests/import-git.scm:139 source: + (test-equal + "latest-git-tag-version: accept pre-releases" + "2.0.0-rc1" + (with-temporary-git-repository + directory + '((add "a.txt" "A") + (commit "First commit") + (tag "2.0.0-rc1" "Release candidate for 2.0.0")) + (let ((package + (make-package + directory + "1.0.0" + '((accept-pre-releases? . #t))))) + (latest-git-tag-version package)))) result: SKIP test-name: latest-git-tag-version: accept pre-releases, and custom prefix location: /home/daniel/guix/tests/import-git.scm:150 source: + (test-equal + "latest-git-tag-version: accept pre-releases, and custom prefix" + "2.0.0-rc1" + (with-temporary-git-repository + directory + '((add "a.txt" "A") + (commit "First commit") + (tag "version-2.0.0-rc1" + "Release candidate for 2.0.0")) + (let ((package + (make-package + directory + "1.0.0" + '((accept-pre-releases? . #t) + (release-tag-prefix . "version-"))))) + (latest-git-tag-version package)))) result: SKIP test-name: latest-git-tag-version: accept pre-releases, and custom suffix location: /home/daniel/guix/tests/import-git.scm:162 source: + (test-equal + "latest-git-tag-version: accept pre-releases, and custom suffix" + "2.0.0-rc1" + (with-temporary-git-repository + directory + '((add "a.txt" "A") + (commit "First commit") + (tag "2.0.0-rc1-suffix" + "Release candidate for 2.0.0")) + (let ((package + (make-package + directory + "1.0.0" + '((accept-pre-releases? . #t) + (release-tag-suffix . "-suffix"))))) + (latest-git-tag-version package)))) result: SKIP test-name: latest-git-tag-version: accept pre-releases, delimiter conflicts with pre-release part location: /home/daniel/guix/tests/import-git.scm:174 source: + (test-equal + "latest-git-tag-version: accept pre-releases, delimiter conflicts with pre-release part" + "2.0.0_alpha" + (with-temporary-git-repository + directory + '((add "a.txt" "A") + (commit "First commit") + (tag "2_0_0_alpha" "Alpha release for 2.0.0")) + (let ((package + (make-package + directory + "1.0.0" + '((accept-pre-releases? . #t) + (release-tag-version-delimiter . "_"))))) + (latest-git-tag-version package)))) result: SKIP test-name: latest-git-tag-version: accept pre-releases, and custom suffix and prefix location: /home/daniel/guix/tests/import-git.scm:186 source: + (test-equal + "latest-git-tag-version: accept pre-releases, and custom suffix and prefix" + "2.0.0-alpha" + (with-temporary-git-repository + directory + '((add "a.txt" "A") + (commit "First commit") + (tag "prefix123-2.0.0-alpha-suffix" + "Alpha release for 2.0.0")) + (let ((package + (make-package + directory + "1.0.0" + '((accept-pre-releases? . #t) + (release-tag-prefix . "prefix[0-9]{3}-") + (release-tag-suffix . "-suffix"))))) + (latest-git-tag-version package)))) result: SKIP test-name: latest-git-tag-version: accept pre-releases, and custom suffix, prefix, and delimiter location: /home/daniel/guix/tests/import-git.scm:199 source: + (test-equal + "latest-git-tag-version: accept pre-releases, and custom suffix, prefix, and delimiter" + "2.0.0-alpha" + (with-temporary-git-repository + directory + '((add "a.txt" "A") + (commit "First commit") + (tag "prefix123-2-0-0-alpha-suffix" + "Alpha release for 2.0.0")) + (let ((package + (make-package + directory + "1.0.0" + '((accept-pre-releases? . #t) + (release-tag-prefix . "prefix[0-9]{3}-") + (release-tag-suffix . "-suffix") + (release-tag-version-delimiter . "-"))))) + (latest-git-tag-version package)))) result: SKIP test-name: latest-git-tag-version: accept pre-releases, no delimiter, and custom suffix, prefix location: /home/daniel/guix/tests/import-git.scm:213 source: + (test-equal + "latest-git-tag-version: accept pre-releases, no delimiter, and custom suffix, prefix" + "2alpha" + (with-temporary-git-repository + directory + '((add "a.txt" "A") + (commit "First commit") + (tag "prefix123-2alpha-suffix" + "Alpha release for version 2")) + (let ((package + (make-package + directory + "1.0.0" + '((accept-pre-releases? . #t) + (release-tag-prefix . "prefix[0-9]{3}-") + (release-tag-suffix . "-suffix") + (release-tag-version-delimiter . ""))))) + (latest-git-tag-version package)))) result: SKIP test-name: latest-git-tag-version: no tags found location: /home/daniel/guix/tests/import-git.scm:227 source: + (test-equal + "latest-git-tag-version: no tags found" + #f + (with-temporary-git-repository + directory + '((add "a.txt" "A") (commit "First commit")) + (let ((package (make-package directory "1.0.0"))) + (latest-git-tag-version package)))) result: SKIP test-name: latest-git-tag-version: no valid tags found location: /home/daniel/guix/tests/import-git.scm:236 source: + (test-equal + "latest-git-tag-version: no valid tags found" + #f + (with-temporary-git-repository + directory + '((add "a.txt" "A") + (commit "First commit") + (tag "Test" "Test tag")) + (let ((package (make-package directory "1.0.0"))) + (latest-git-tag-version package)))) result: SKIP FAIL: tests/lint ================ test-name: description: not a string location: /home/daniel/guix/tests/lint.scm:94 source: + (test-equal + "description: not a string" + "invalid description: foobar" + (single-lint-warning-message + (check-description-style + (dummy-package "x" (description 'foobar))))) expected-value: "invalid description: foobar" actual-value: "invalid description: foobar" result: PASS test-name: description: not empty location: /home/daniel/guix/tests/lint.scm:100 source: + (test-equal + "description: not empty" + "description should not be empty" + (single-lint-warning-message + (check-description-style + (dummy-package "x" (description ""))))) expected-value: "description should not be empty" actual-value: "description should not be empty" result: PASS test-name: description: invalid Texinfo markup location: /home/daniel/guix/tests/lint.scm:106 source: + (test-equal + "description: invalid Texinfo markup" + "Texinfo markup in description is invalid" + (single-lint-warning-message + (check-description-style + (dummy-package "x" (description "f{oo}b@r"))))) expected-value: "Texinfo markup in description is invalid" actual-value: "Texinfo markup in description is invalid" result: PASS test-name: description: does not start with an upper-case letter location: /home/daniel/guix/tests/lint.scm:112 source: + (test-equal + "description: does not start with an upper-case letter" + "description should start with an upper-case letter or digit" + (single-lint-warning-message + (let ((pkg (dummy-package + "x" + (description "bad description.")))) + (check-description-style pkg)))) expected-value: "description should start with an upper-case letter or digit" actual-value: "description should start with an upper-case letter or digit" result: PASS test-name: description: may start with a digit location: /home/daniel/guix/tests/lint.scm:119 source: + (test-equal + "description: may start with a digit" + '() + (let ((pkg (dummy-package + "x" + (description "2-component library.")))) + (check-description-style pkg))) expected-value: () actual-value: () result: PASS test-name: description: may start with lower-case package name location: /home/daniel/guix/tests/lint.scm:125 source: + (test-equal + "description: may start with lower-case package name" + '() + (let ((pkg (dummy-package + "x" + (description "x is a dummy package.")))) + (check-description-style pkg))) expected-value: () actual-value: () result: PASS test-name: description: two spaces after end of sentence location: /home/daniel/guix/tests/lint.scm:131 source: + (test-equal + "description: two spaces after end of sentence" + "sentences in description should be followed by two spaces; possible infraction at 3" + (single-lint-warning-message + (let ((pkg (dummy-package + "x" + (description "Bad. Quite bad.")))) + (check-description-style pkg)))) expected-value: "sentences in description should be followed by two spaces; possible infraction at 3" actual-value: "sentences in description should be followed by two spaces; possible infraction at 3" result: PASS test-name: description: end-of-sentence detection with abbreviations location: /home/daniel/guix/tests/lint.scm:138 source: + (test-equal + "description: end-of-sentence detection with abbreviations" + '() + (let ((pkg (dummy-package + "x" + (description + "E.g. Foo, i.e. Bar resp. Baz (a.k.a. DVD).")))) + (check-description-style pkg))) expected-value: () actual-value: () result: PASS test-name: description: may not contain trademark signs: ? location: /home/daniel/guix/tests/lint.scm:145 source: + (test-equal + "description: may not contain trademark signs: ?" + "description should not contain trademark sign '?' at 20" + (single-lint-warning-message + (let ((pkg (dummy-package + "x" + (description "Does The Right Thing?")))) + (check-description-style pkg)))) expected-value: "description should not contain trademark sign '?' at 20" actual-value: "description should not contain trademark sign '?' at 20" result: PASS test-name: description: may not contain trademark signs: ? location: /home/daniel/guix/tests/lint.scm:152 source: + (test-equal + "description: may not contain trademark signs: ?" + "description should not contain trademark sign '?' at 17" + (single-lint-warning-message + (let ((pkg (dummy-package + "x" + (description "Works with Format?")))) + (check-description-style pkg)))) expected-value: "description should not contain trademark sign '?' at 17" actual-value: "description should not contain trademark sign '?' at 17" result: PASS test-name: description: suggest ornament instead of quotes location: /home/daniel/guix/tests/lint.scm:159 source: + (test-equal + "description: suggest ornament instead of quotes" + "use @code or similar ornament instead of quotes" + (single-lint-warning-message + (let ((pkg (dummy-package + "x" + (description "This is a 'quoted' thing.")))) + (check-description-style pkg)))) expected-value: "use @code or similar ornament instead of quotes" actual-value: "use @code or similar ornament instead of quotes" result: PASS test-name: description: leading whitespace location: /home/daniel/guix/tests/lint.scm:166 source: + (test-equal + "description: leading whitespace" + "description contains leading whitespace" + (single-lint-warning-message + (let ((pkg (dummy-package "x" (description " Whitespace.")))) + (check-description-style pkg)))) expected-value: "description contains leading whitespace" actual-value: "description contains leading whitespace" result: PASS test-name: description: trailing whitespace location: /home/daniel/guix/tests/lint.scm:173 source: + (test-equal + "description: trailing whitespace" + "description contains trailing whitespace" + (single-lint-warning-message + (let ((pkg (dummy-package "x" (description "Whitespace. ")))) + (check-description-style pkg)))) expected-value: "description contains trailing whitespace" actual-value: "description contains trailing whitespace" result: PASS test-name: synopsis: not a string location: /home/daniel/guix/tests/lint.scm:180 source: + (test-equal + "synopsis: not a string" + "invalid synopsis: #f" + (single-lint-warning-message + (let ((pkg (dummy-package "x" (synopsis #f)))) + (check-synopsis-style pkg)))) expected-value: "invalid synopsis: #f" actual-value: "invalid synopsis: #f" result: PASS test-name: synopsis: not empty location: /home/daniel/guix/tests/lint.scm:187 source: + (test-equal + "synopsis: not empty" + "synopsis should not be empty" + (single-lint-warning-message + (let ((pkg (dummy-package "x" (synopsis "")))) + (check-synopsis-style pkg)))) expected-value: "synopsis should not be empty" actual-value: "synopsis should not be empty" result: PASS test-name: synopsis: valid Texinfo markup location: /home/daniel/guix/tests/lint.scm:194 source: + (test-equal + "synopsis: valid Texinfo markup" + "Texinfo markup in synopsis is invalid" + (single-lint-warning-message + (check-synopsis-style + (dummy-package "x" (synopsis "Bad $@ texinfo"))))) expected-value: "Texinfo markup in synopsis is invalid" actual-value: "Texinfo markup in synopsis is invalid" result: PASS test-name: synopsis: does not start with an upper-case letter location: /home/daniel/guix/tests/lint.scm:200 source: + (test-equal + "synopsis: does not start with an upper-case letter" + "synopsis should start with an upper-case letter or digit" + (single-lint-warning-message + (let ((pkg (dummy-package "x" (synopsis "bad synopsis")))) + (check-synopsis-style pkg)))) expected-value: "synopsis should start with an upper-case letter or digit" actual-value: "synopsis should start with an upper-case letter or digit" result: PASS test-name: synopsis: may start with a digit location: /home/daniel/guix/tests/lint.scm:207 source: + (test-equal + "synopsis: may start with a digit" + '() + (let ((pkg (dummy-package + "x" + (synopsis "5-dimensional frobnicator")))) + (check-synopsis-style pkg))) expected-value: () actual-value: () result: PASS test-name: synopsis: ends with a period location: /home/daniel/guix/tests/lint.scm:213 source: + (test-equal + "synopsis: ends with a period" + "no period allowed at the end of the synopsis" + (single-lint-warning-message + (let ((pkg (dummy-package "x" (synopsis "Bad synopsis.")))) + (check-synopsis-style pkg)))) expected-value: "no period allowed at the end of the synopsis" actual-value: "no period allowed at the end of the synopsis" result: PASS test-name: synopsis: ends with 'etc.' location: /home/daniel/guix/tests/lint.scm:220 source: + (test-equal + "synopsis: ends with 'etc.'" + '() + (let ((pkg (dummy-package "x" (synopsis "Foo, bar, etc.")))) + (check-synopsis-style pkg))) expected-value: () actual-value: () result: PASS test-name: synopsis: starts with 'A' location: /home/daniel/guix/tests/lint.scm:226 source: + (test-equal + "synopsis: starts with 'A'" + "no article allowed at the beginning of the synopsis" + (single-lint-warning-message + (let ((pkg (dummy-package "x" (synopsis "A bad synop?is")))) + (check-synopsis-style pkg)))) expected-value: "no article allowed at the beginning of the synopsis" actual-value: "no article allowed at the beginning of the synopsis" result: PASS test-name: synopsis: starts with 'An' location: /home/daniel/guix/tests/lint.scm:233 source: + (test-equal + "synopsis: starts with 'An'" + "no article allowed at the beginning of the synopsis" + (single-lint-warning-message + (let ((pkg (dummy-package + "x" + (synopsis "An awful synopsis")))) + (check-synopsis-style pkg)))) expected-value: "no article allowed at the beginning of the synopsis" actual-value: "no article allowed at the beginning of the synopsis" result: PASS test-name: synopsis: starts with 'a' location: /home/daniel/guix/tests/lint.scm:240 source: + (test-equal + "synopsis: starts with 'a'" + '("no article allowed at the beginning of the synopsis" + "synopsis should start with an upper-case letter or digit") + (sort (map lint-warning-message + (let ((pkg (dummy-package "x" (synopsis "a bad synopsis")))) + (check-synopsis-style pkg))) + string + `("PERL5LIB" ":" prefix (,lib-path ,site-dir))) + (find-files bin-dir))))))) + (pkg (dummy-package + "x" + (arguments `(#:phases ,phases))))) + (single-lint-warning-message + (check-wrapper-inputs pkg)))) expected-value: "\"bash-minimal\" should be in 'inputs' when 'wrap-program' is used" actual-value: "\"bash-minimal\" should be in 'inputs' when 'wrap-program' is used" result: PASS test-name: bogus phase specifications don't crash the linter location: /home/daniel/guix/tests/lint.scm:447 source: + (test-equal + "bogus phase specifications don't crash the linter" + "invalid phase clause" + (let* ((phases + `(modify-phases %standard-phases (add-invalid))) + (pkg (dummy-package + "x" + (arguments `(#:phases ,phases))))) + (single-lint-warning-message + (check-wrapper-inputs pkg)))) expected-value: "invalid phase clause" actual-value: "invalid phase clause" result: PASS test-name: file patches: different file name -> warning location: /home/daniel/guix/tests/lint.scm:455 source: + (test-equal + "file patches: different file name -> warning" + "file names of patches should start with the package name" + (single-lint-warning-message + (let ((pkg (dummy-package + "x" + (source + (dummy-origin + (patches (list "/path/to/y.patch"))))))) + (check-patch-file-names pkg)))) expected-value: "file names of patches should start with the package name" actual-value: "file names of patches should start with the package name" result: PASS test-name: file patches: same file name -> no warnings location: /home/daniel/guix/tests/lint.scm:464 source: + (test-equal + "file patches: same file name -> no warnings" + '() + (let ((pkg (dummy-package + "x" + (source + (dummy-origin + (patches (list "/path/to/x.patch"))))))) + (check-patch-file-names pkg))) expected-value: () actual-value: () result: PASS test-name: patches: different file name -> warning location: /home/daniel/guix/tests/lint.scm:472 source: + (test-equal + " patches: different file name -> warning" + "file names of patches should start with the package name" + (single-lint-warning-message + (let ((pkg (dummy-package + "x" + (source + (dummy-origin + (patches + (list (dummy-origin (file-name "y.patch"))))))))) + (check-patch-file-names pkg)))) expected-value: "file names of patches should start with the package name" actual-value: "file names of patches should start with the package name" result: PASS test-name: patches: same file name -> no warnings location: /home/daniel/guix/tests/lint.scm:484 source: + (test-equal + " patches: same file name -> no warnings" + '() + (let ((pkg (dummy-package + "x" + (source + (dummy-origin + (patches + (list (dummy-origin (file-name "x.patch"))))))))) + (check-patch-file-names pkg))) expected-value: () actual-value: () result: PASS test-name: patches: file name too long location: /home/daniel/guix/tests/lint.scm:495 source: + (test-equal + "patches: file name too long" + (string-append + "x-" + (make-string 100 #\a) + ".patch: file name is too long") + (single-lint-warning-message + (let ((pkg (dummy-package + "x" + (source + (dummy-origin + (patches + (list (string-append + "x-" + (make-string 100 #\a) + ".patch")))))))) + (check-patch-file-names pkg)))) expected-value: "x-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.patch: file name is too long" actual-value: "x-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.patch: file name is too long" result: PASS test-name: patches: not found location: /home/daniel/guix/tests/lint.scm:509 source: + (test-equal + "patches: not found" + "this-patch-does-not-exist!: patch not found\n" + (single-lint-warning-message + (let ((pkg (dummy-package + "x" + (source + (dummy-origin + (patches + (list (search-patch + "this-patch-does-not-exist!")))))))) + (check-patch-file-names pkg)))) expected-value: "this-patch-does-not-exist!: patch not found\n" actual-value: "this-patch-does-not-exist!: patch not found\n" result: PASS test-name: patch headers: no warnings location: /home/daniel/guix/tests/lint.scm:520 source: + (test-assert + "patch headers: no warnings" + (call-with-temporary-directory + (lambda (directory) + (call-with-output-file + (string-append directory "/t.patch") + (lambda (port) + (display + "This is a patch.\n\n--- a\n+++ b\n" + port))) + (parameterize + ((%patch-path (list directory))) + (let ((pkg (dummy-package + "x" + (source + (dummy-origin + (patches (search-patches "t.patch"))))))) + (null? (check-patch-headers pkg))))))) actual-value: #t result: PASS test-name: patch headers: missing comment location: /home/daniel/guix/tests/lint.scm:534 source: + (test-equal + "patch headers: missing comment" + "t.patch: patch lacks comment and upstream status" + (call-with-temporary-directory + (lambda (directory) + (call-with-output-file + (string-append directory "/t.patch") + (lambda (port) (display "\n--- a\n+++ b\n" port))) + (parameterize + ((%patch-path (list directory))) + (let ((pkg (dummy-package + "x" + (source + (dummy-origin + (patches (search-patches "t.patch"))))))) + (single-lint-warning-message + (check-patch-headers pkg))))))) expected-value: "t.patch: patch lacks comment and upstream status" actual-value: "t.patch: patch lacks comment and upstream status" result: PASS test-name: patch headers: empty location: /home/daniel/guix/tests/lint.scm:549 source: + (test-equal + "patch headers: empty" + "t.patch: empty patch" + (call-with-temporary-directory + (lambda (directory) + (call-with-output-file + (string-append directory "/t.patch") + (const #t)) + (parameterize + ((%patch-path '())) + (let ((pkg (dummy-package + "x" + (source + (dummy-origin + (patches + (list (local-file + (string-append + directory + "/t.patch"))))))))) + (single-lint-warning-message + (check-patch-headers pkg))))))) expected-value: "t.patch: empty patch" actual-value: "t.patch: empty patch" result: PASS test-name: patch headers: patch not found location: /home/daniel/guix/tests/lint.scm:565 source: + (test-equal + "patch headers: patch not found" + "does-not-exist.patch: patch not found\n" + (parameterize + ((%patch-path '())) + (let ((pkg (dummy-package + "x" + (source + (dummy-origin + (patches (search-patches "does-not-exist.patch"))))))) + (single-lint-warning-message + (check-patch-headers pkg))))) expected-value: "does-not-exist.patch: patch not found\n" actual-value: "does-not-exist.patch: patch not found\n" result: PASS test-name: derivation: invalid arguments location: /home/daniel/guix/tests/lint.scm:574 source: + (test-equal + "derivation: invalid arguments" + "failed to create x86_64-linux derivation: (wrong-type-arg \"map\" \"Wrong type argument: ~S\" (invalid-module) ())" + (match (let ((pkg (dummy-package + "x" + (arguments + '(#:imported-modules (invalid-module)))))) + (check-derivation pkg)) + (((and (? lint-warning?) first-warning) + others + ...) + (lint-warning-message first-warning)))) expected-value: "failed to create x86_64-linux derivation: (wrong-type-arg \"map\" \"Wrong type argument: ~S\" (invalid-module) ())" actual-value: "failed to create x86_64-linux derivation: (wrong-type-arg \"map\" \"Wrong type argument: ~S\" (invalid-module) ())" result: PASS test-name: profile-collisions: no warnings location: /home/daniel/guix/tests/lint.scm:583 source: + (test-equal + "profile-collisions: no warnings" + '() + (check-profile-collisions (dummy-package "x"))) expected-value: () actual-value: () result: PASS test-name: profile-collisions: propagated inputs collide location: /home/daniel/guix/tests/lint.scm:587 source: + (test-equal + "profile-collisions: propagated inputs collide" + "propagated inputs p0@1 and p0@2 collide" + (let* ((p0 (dummy-package "p0" (version "1"))) + (p0* (dummy-package "p0" (version "2"))) + (p1 (dummy-package + "p1" + (propagated-inputs `(("p0" ,p0))))) + (p2 (dummy-package + "p2" + (propagated-inputs `(("p1" ,p1))))) + (p3 (dummy-package + "p3" + (propagated-inputs `(("p0" ,p0*))))) + (p4 (dummy-package + "p4" + (propagated-inputs `(("p2" ,p2) ("p3" ,p3)))))) + (single-lint-warning-message + (check-profile-collisions p4)))) expected-value: "propagated inputs p0@1 and p0@2 collide" actual-value: "propagated inputs p0@1 and p0@2 collide" result: PASS test-name: profile-collisions: propagated inputs collide, store items location: /home/daniel/guix/tests/lint.scm:599 source: + (test-assert + "profile-collisions: propagated inputs collide, store items" + (string-match-or-error + "propagated inputs /[[:graph:]]+-p0-1 and /[[:graph:]]+-p0-1 collide" + (let* ((p0 (dummy-package "p0" (version "1"))) + (p0* (dummy-package + "p0" + (version "1") + (inputs `(("x" ,(dummy-package "x")))))) + (p1 (dummy-package + "p1" + (propagated-inputs `(("p0" ,p0))))) + (p2 (dummy-package + "p2" + (propagated-inputs `(("p1" ,p1))))) + (p3 (dummy-package + "p3" + (propagated-inputs `(("p0" ,p0*))))) + (p4 (dummy-package + "p4" + (propagated-inputs `(("p2" ,p2) ("p3" ,p3)))))) + (single-lint-warning-message + (check-profile-collisions p4))))) actual-value: #("propagated inputs /home/daniel/guix/test-tmp/store/n66cfd24qpl2wis38b7l242qc8yjmaxg-p0-1 and /home/daniel/guix/test-tmp/store/9l6q2y11mkfblxhrf47wzrr024s2hhw7-p0-1 collide" (0 . 171)) result: PASS test-name: license: invalid license location: /home/daniel/guix/tests/lint.scm:613 source: + (test-equal + "license: invalid license" + "invalid license field" + (single-lint-warning-message + (check-license (dummy-package "x" (license #f))))) expected-value: "invalid license field" actual-value: "invalid license field" result: PASS test-name: home-page: wrong home-page location: /home/daniel/guix/tests/lint.scm:618 source: + (test-equal + "home-page: wrong home-page" + "invalid value for home page" + (let ((pkg (package + (inherit (dummy-package "x")) + (home-page #f)))) + (single-lint-warning-message + (check-home-page pkg)))) expected-value: "invalid value for home page" actual-value: "invalid value for home page" result: PASS test-name: home-page: invalid URI location: /home/daniel/guix/tests/lint.scm:626 source: + (test-equal + "home-page: invalid URI" + "invalid home page URL: \"foobar\"" + (let ((pkg (package + (inherit (dummy-package "x")) + (home-page "foobar")))) + (single-lint-warning-message + (check-home-page pkg)))) expected-value: "invalid home page URL: \"foobar\"" actual-value: "invalid home page URL: \"foobar\"" result: PASS test-name: home-page: host not found location: /home/daniel/guix/tests/lint.scm:634 source: + (test-assert + "home-page: host not found" + (let ((pkg (package + (inherit (dummy-package "x")) + (home-page "http://does-not-exist")))) + (warning-contains? + "domain not found" + (check-home-page pkg)))) actual-value: 26 result: PASS test-name: home-page: Connection refused location: /home/daniel/guix/tests/lint.scm:642 source: + (test-equal + "home-page: Connection refused" + "URI http://localhost:9999/foo/bar unreachable: Connection refused" + (let ((pkg (package + (inherit (dummy-package "x")) + (home-page (%local-url))))) + (single-lint-warning-message + (check-home-page pkg)))) expected-value: "URI http://localhost:9999/foo/bar unreachable: Connection refused" actual-value: "URI http://localhost:9999/foo/bar unreachable: Connection refused" result: PASS test-name: home-page: 200 location: /home/daniel/guix/tests/lint.scm:650 source: + (test-equal + "home-page: 200" + '() + (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: () result: PASS test-name: home-page: 200 but short length location: /home/daniel/guix/tests/lint.scm:659 source: + (test-equal + "home-page: 200 but short length" + (format + #f + "URI ~a returned suspiciously small file (18 bytes)" + (%local-url)) + (let ((pkg (package + (inherit (dummy-package "x")) + (home-page (%local-url))))) + (single-lint-warning-message + (check-home-page pkg)))) expected-value: "URI http://localhost:34239/foo/bar returned suspiciously small file (18 bytes)" actual-value: "URI http://localhost:34239/foo/bar returned suspiciously small file (18 bytes)" result: PASS test-name: home-page: 404 location: /home/daniel/guix/tests/lint.scm:670 source: + (test-equal + "home-page: 404" + (format + #f + "URI ~a not reachable: 404 (\"Such is life\")" + (%local-url)) + (let ((pkg (package + (inherit (dummy-package "x")) + (home-page (%local-url))))) + (single-lint-warning-message + (check-home-page pkg)))) expected-value: "URI http://localhost:37947/foo/bar not reachable: 404 (\"Such is life\")" actual-value: "URI http://localhost:37947/foo/bar not reachable: 404 (\"Such is life\")" result: PASS test-name: home-page: 301, invalid location: /home/daniel/guix/tests/lint.scm:679 source: + (test-equal + "home-page: 301, invalid" + (format + #f + "invalid permanent redirect from ~a" + (%local-url)) + (let ((pkg (package + (inherit (dummy-package "x")) + (home-page (%local-url))))) + (single-lint-warning-message + (check-home-page pkg)))) expected-value: "invalid permanent redirect from http://localhost:36297/foo/bar" actual-value: "invalid permanent redirect from http://localhost:36297/foo/bar" result: PASS test-name: home-page: 301 -> 200 location: /home/daniel/guix/tests/lint.scm:695 source: + (test-equal + "home-page: 301 -> 200" + (format + #f + "permanent redirect from ~a to ~a" + (%local-url) + initial-url) + (let ((pkg (package + (inherit (dummy-package "x")) + (home-page (%local-url))))) + (single-lint-warning-message + (check-home-page pkg)))) expected-value: "permanent redirect from http://localhost:39413/foo/bar to http://localhost:42427/foo/bar" actual-value: "permanent redirect from http://localhost:39413/foo/bar to http://localhost:42427/foo/bar" result: PASS test-name: home-page: 301 -> 404 location: /home/daniel/guix/tests/lint.scm:712 source: + (test-equal + "home-page: 301 -> 404" + (format + #f + "URI ~a not reachable: 404 (\"Such is life\")" + (%local-url)) + (let ((pkg (package + (inherit (dummy-package "x")) + (home-page (%local-url))))) + (single-lint-warning-message + (check-home-page pkg)))) expected-value: "URI http://localhost:37713/foo/bar not reachable: 404 (\"Such is life\")" actual-value: "URI http://localhost:37713/foo/bar not reachable: 404 (\"Such is life\")" result: PASS test-name: source-file-name location: /home/daniel/guix/tests/lint.scm:721 source: + (test-equal + "source-file-name" + "the source file name should contain the package name" + (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)))))) + (single-lint-warning-message + (check-source-file-name pkg)))) expected-value: "the source file name should contain the package name" actual-value: "the source file name should contain the package name" result: PASS test-name: source-file-name: v prefix location: /home/daniel/guix/tests/lint.scm:733 source: + (test-equal + "source-file-name: v prefix" + "the source file name should contain the package name" + (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)))))) + (single-lint-warning-message + (check-source-file-name pkg)))) expected-value: "the source file name should contain the package name" actual-value: "the source file name should contain the package name" result: PASS test-name: source-file-name: bad checkout location: /home/daniel/guix/tests/lint.scm:745 source: + (test-equal + "source-file-name: bad checkout" + "the source file name should contain the package name" + (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)))))) + (single-lint-warning-message + (check-source-file-name pkg)))) expected-value: "the source file name should contain the package name" actual-value: "the source file name should contain the package name" result: PASS test-name: source-file-name: good checkout location: /home/daniel/guix/tests/lint.scm:759 source: + (test-equal + "source-file-name: good checkout" + '() + (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))) expected-value: () actual-value: () result: PASS test-name: source-file-name: valid location: /home/daniel/guix/tests/lint.scm:773 source: + (test-equal + "source-file-name: valid" + '() + (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))) expected-value: () actual-value: () result: PASS test-name: source-unstable-tarball location: /home/daniel/guix/tests/lint.scm:784 source: + (test-equal + "source-unstable-tarball" + "the source URI should not be an autogenerated tarball" + (let ((pkg (dummy-package + "x" + (source + (origin + (method url-fetch) + (uri "https://github.com/example/example/archive/v0.0.tar.gz") + (sha256 %null-sha256)))))) + (single-lint-warning-message + (check-source-unstable-tarball pkg)))) expected-value: "the source URI should not be an autogenerated tarball" actual-value: "the source URI should not be an autogenerated tarball" result: PASS test-name: source-unstable-tarball: source #f location: /home/daniel/guix/tests/lint.scm:795 source: + (test-equal + "source-unstable-tarball: source #f" + '() + (let ((pkg (dummy-package "x" (source #f)))) + (check-source-unstable-tarball pkg))) expected-value: () actual-value: () result: PASS test-name: source-unstable-tarball: valid location: /home/daniel/guix/tests/lint.scm:801 source: + (test-equal + "source-unstable-tarball: valid" + '() + (let ((pkg (dummy-package + "x" + (source + (origin + (method url-fetch) + (uri "https://github.com/example/example/releases/download/x-0.0/x-0.0.tar.gz") + (sha256 %null-sha256)))))) + (check-source-unstable-tarball pkg))) expected-value: () actual-value: () result: PASS test-name: source-unstable-tarball: package named archive location: /home/daniel/guix/tests/lint.scm:811 source: + (test-equal + "source-unstable-tarball: package named archive" + '() + (let ((pkg (dummy-package + "x" + (source + (origin + (method url-fetch) + (uri "https://github.com/example/archive/releases/download/x-0.0/x-0.0.tar.gz") + (sha256 %null-sha256)))))) + (check-source-unstable-tarball pkg))) expected-value: () actual-value: () result: PASS test-name: source-unstable-tarball: not-github location: /home/daniel/guix/tests/lint.scm:821 source: + (test-equal + "source-unstable-tarball: not-github" + '() + (let ((pkg (dummy-package + "x" + (source + (origin + (method url-fetch) + (uri "https://bitbucket.org/archive/example/download/x-0.0.tar.gz") + (sha256 %null-sha256)))))) + (check-source-unstable-tarball pkg))) expected-value: () actual-value: () result: PASS test-name: source-unstable-tarball: git-fetch location: /home/daniel/guix/tests/lint.scm:831 source: + (test-equal + "source-unstable-tarball: git-fetch" + '() + (let ((pkg (dummy-package + "x" + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/archive/example") + (commit "0"))) + (sha256 %null-sha256)))))) + (check-source-unstable-tarball pkg))) expected-value: () actual-value: () result: PASS test-name: optional-tests: no check phase location: /home/daniel/guix/tests/lint.scm:852 source: + (test-equal + "optional-tests: no check phase" + '() + (let ((pkg (package-with-phase-changes '()))) + (check-optional-tests pkg))) expected-value: () actual-value: () result: PASS test-name: optional-tests: check phase respects #:tests? location: /home/daniel/guix/tests/lint.scm:857 source: + (test-equal + "optional-tests: check phase respects #:tests?" + '() + (let ((pkg (package-with-phase-changes + '((replace + 'check + (lambda* (#:key tests? #:allow-other-keys?) + (when tests? (invoke "./the-test-suite")))))))) + (check-optional-tests pkg))) expected-value: () actual-value: () result: PASS test-name: optional-tests: check phase ignores #:tests? location: /home/daniel/guix/tests/lint.scm:866 source: + (test-equal + "optional-tests: check phase ignores #:tests?" + "the 'check' phase should respect #:tests?" + (let ((pkg (package-with-phase-changes + '((replace + 'check + (lambda _ (invoke "./the-test-suite"))))))) + (single-lint-warning-message + (check-optional-tests pkg)))) expected-value: "the 'check' phase should respect #:tests?" actual-value: "the 'check' phase should respect #:tests?" result: PASS test-name: optional-tests: do not crash when #:phases is invalid location: /home/daniel/guix/tests/lint.scm:875 source: + (test-equal + "optional-tests: do not crash when #:phases is invalid" + "incorrect call to ?modify-phases?" + (let ((pkg (package-with-phase-changes 'this-is-not-a-list))) + (single-lint-warning-message + (check-optional-tests pkg)))) expected-value: "incorrect call to ?modify-phases?" actual-value: "incorrect call to ?modify-phases?" result: PASS test-name: optional-tests: allow G-exps (no warning) location: /home/daniel/guix/tests/lint.scm:881 source: + (test-equal + "optional-tests: allow G-exps (no warning)" + '() + (let ((pkg (package-with-phase-changes (gexp ())))) + (check-optional-tests pkg))) expected-value: () actual-value: () result: PASS test-name: optional-tests: allow G-exps (warning) location: /home/daniel/guix/tests/lint.scm:886 source: + (test-equal + "optional-tests: allow G-exps (warning)" + "the 'check' phase should respect #:tests?" + (let ((pkg (package-with-phase-changes + (gexp ((replace + 'check + (lambda _ (invoke "/the-test-suite")))))))) + (single-lint-warning-message + (check-optional-tests pkg)))) expected-value: "the 'check' phase should respect #:tests?" actual-value: "the 'check' phase should respect #:tests?" result: PASS test-name: optional-tests: complicated 'check' phase location: /home/daniel/guix/tests/lint.scm:895 source: + (test-equal + "optional-tests: complicated 'check' phase" + "the 'check' phase should respect #:tests?" + (let ((pkg (package-with-phase-changes + '((replace + 'check + (lambda* (#:key inputs tests? #:allow-other-keys) + (let ((something (stuff from inputs or native-inputs))) + (delete-file "dateutil/test/test_utils.py") + (invoke "pytest" "-vv")))))))) + (single-lint-warning-message + (check-optional-tests pkg)))) expected-value: "the 'check' phase should respect #:tests?" actual-value: "the 'check' phase should respect #:tests?" result: PASS test-name: optional-tests: 'check' phase is not first phase location: /home/daniel/guix/tests/lint.scm:906 source: + (test-equal + "optional-tests: 'check' phase is not first phase" + "the 'check' phase should respect #:tests?" + (let ((pkg (package-with-phase-changes + '((add-after + 'unpack + (lambda _ (chdir "libtestcase-0.0.0"))) + (replace + 'check + (lambda _ (invoke "./test-suite"))))))) + (single-lint-warning-message + (check-optional-tests pkg)))) expected-value: "the 'check' phase should respect #:tests?" actual-value: "the 'check' phase should respect #:tests?" result: PASS test-name: source: 200 location: /home/daniel/guix/tests/lint.scm:917 source: + (test-equal + "source: 200" + '() + (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)))) expected-value: () actual-value: () result: PASS test-name: source: 200 but short length location: /home/daniel/guix/tests/lint.scm:929 source: + (test-equal + "source: 200 but short length" + (format + #f + "URI ~a returned suspiciously small file (18 bytes)" + (%local-url)) + (let ((pkg (package + (inherit (dummy-package "x")) + (source + (origin + (method url-fetch) + (uri (%local-url)) + (sha256 %null-sha256)))))) + (match (check-source pkg) + ((first-warning + (and (? lint-warning?) second-warning)) + (lint-warning-message second-warning))))) expected-value: "URI http://localhost:38391/foo/bar returned suspiciously small file (18 bytes)" actual-value: "URI http://localhost:38391/foo/bar returned suspiciously small file (18 bytes)" result: PASS test-name: source: 404 location: /home/daniel/guix/tests/lint.scm:944 source: + (test-equal + "source: 404" + (format + #f + "URI ~a not reachable: 404 (\"Such is life\")" + (%local-url)) + (let ((pkg (package + (inherit (dummy-package "x")) + (source + (origin + (method url-fetch) + (uri (%local-url)) + (sha256 %null-sha256)))))) + (match (check-source pkg) + ((first-warning + (and (? lint-warning?) second-warning)) + (lint-warning-message second-warning))))) expected-value: "URI http://localhost:37505/foo/bar not reachable: 404 (\"Such is life\")" actual-value: "URI http://localhost:37505/foo/bar not reachable: 404 (\"Such is life\")" result: PASS test-name: source: 404 and 200 location: /home/daniel/guix/tests/lint.scm:958 source: + (test-equal + "source: 404 and 200" + '() + (with-http-server + `((404 ,%long-string)) + (let ((bad-url (%local-url))) + (parameterize + ((%http-server-port (+ 1 (%http-server-port)))) + (with-http-server + `((200 ,%long-string)) + (let ((pkg (package + (inherit (dummy-package "x")) + (source + (origin + (method url-fetch) + (uri (list bad-url (%local-url))) + (sha256 %null-sha256)))))) + (check-source pkg))))))) expected-value: () actual-value: () result: PASS test-name: source: 301 -> 200 location: /home/daniel/guix/tests/lint.scm:982 source: + (test-equal + "source: 301 -> 200" + (format + #f + "permanent redirect from ~a to ~a" + (%local-url) + initial-url) + (let ((pkg (package + (inherit (dummy-package "x")) + (source + (origin + (method url-fetch) + (uri (%local-url)) + (sha256 %null-sha256)))))) + (match (check-source pkg) + ((first-warning + (and (? lint-warning?) second-warning)) + (lint-warning-message second-warning))))) expected-value: "permanent redirect from http://localhost:40117/foo/bar to http://localhost:38775/foo/bar" actual-value: "permanent redirect from http://localhost:40117/foo/bar to http://localhost:38775/foo/bar" result: PASS test-name: source, git-reference: 301 -> 200 location: /home/daniel/guix/tests/lint.scm:1004 source: + (test-equal + "source, git-reference: 301 -> 200" + (format + #f + "permanent redirect from ~a to ~a" + (%local-url) + initial-url) + (let ((pkg (dummy-package + "x" + (source + (origin + (method git-fetch) + (uri (git-reference + (url (%local-url)) + (commit "v1.0.0"))) + (sha256 %null-sha256)))))) + (single-lint-warning-message (check-source pkg)))) expected-value: "permanent redirect from http://localhost:41019/foo/bar to http://localhost:36669/foo/bar" actual-value: "permanent redirect from http://localhost:41019/foo/bar to http://localhost:36669/foo/bar" result: PASS test-name: source: 301 -> 404 location: /home/daniel/guix/tests/lint.scm:1024 source: + (test-equal + "source: 301 -> 404" + (format + #f + "URI ~a not reachable: 404 (\"Such is life\")" + (%local-url)) + (let ((pkg (package + (inherit (dummy-package "x")) + (source + (origin + (method url-fetch) + (uri (%local-url)) + (sha256 %null-sha256)))))) + (match (check-source pkg) + ((first-warning + (and (? lint-warning?) second-warning)) + (lint-warning-message second-warning))))) expected-value: "URI http://localhost:43077/foo/bar not reachable: 404 (\"Such is life\")" actual-value: "URI http://localhost:43077/foo/bar not reachable: 404 (\"Such is life\")" result: PASS test-name: mirror-url location: /home/daniel/guix/tests/lint.scm:1039 source: + (test-equal + "mirror-url" + '() + (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))))) expected-value: () actual-value: () result: PASS test-name: mirror-url: one suggestion location: /home/daniel/guix/tests/lint.scm:1047 source: + (test-equal + "mirror-url: one suggestion" + "URL should be 'mirror://gnu/foo/foo.tar.gz'" + (let ((source + (origin + (method url-fetch) + (uri "http://ftp.gnu.org/pub/gnu/foo/foo.tar.gz") + (sha256 %null-sha256)))) + (single-lint-warning-message + (check-mirror-url + (dummy-package "x" (source source)))))) expected-value: "URL should be 'mirror://gnu/foo/foo.tar.gz'" actual-value: "URL should be 'mirror://gnu/foo/foo.tar.gz'" result: PASS test-name: github-url location: /home/daniel/guix/tests/lint.scm:1056 source: + (test-equal + "github-url" + '() + (with-http-server + `((200 ,%long-string)) + (check-github-url + (dummy-package + "x" + (source + (origin + (method url-fetch) + (uri (%local-url)) + (sha256 %null-sha256))))))) expected-value: () actual-value: () result: PASS test-name: github-url: one suggestion location: /home/daniel/guix/tests/lint.scm:1067 source: + (test-equal + "github-url: one suggestion" + (string-append "URL should be '" github-url "'") + (let ((redirect + (build-response + #:code + 301 + #:headers + `((location unquote (string->uri github-url)))))) + (with-http-server + `((,redirect "")) + (let* ((initial-url (%local-url)) + (redirect + (build-response + #:code + 302 + #:headers + `((location unquote (string->uri initial-url)))))) + (parameterize + ((%http-server-port 0)) + (with-http-server + `((,redirect "")) + (single-lint-warning-message + (check-github-url + (dummy-package + "x" + (source + (origin + (method url-fetch) + (uri (%local-url)) + (sha256 %null-sha256)))))))))))) expected-value: "URL should be 'https://github.com/foo/bar/bar-1.0.tar.gz'" actual-value: "URL should be 'https://github.com/foo/bar/bar-1.0.tar.gz'" result: PASS test-name: github-url: already the correct github url location: /home/daniel/guix/tests/lint.scm:1090 source: + (test-equal + "github-url: already the correct github url" + '() + (check-github-url + (dummy-package + "x" + (source + (origin + (method url-fetch) + (uri github-url) + (sha256 %null-sha256)))))) expected-value: () actual-value: () result: PASS test-name: cve location: /home/daniel/guix/tests/lint.scm:1099 source: + (test-equal + "cve" + '() + (mock ((guix lint) package-vulnerabilities (const '())) + (check-vulnerabilities (dummy-package "x")))) expected-value: () actual-value: () result: PASS test-name: cve: one vulnerability location: /home/daniel/guix/tests/lint.scm:1104 source: + (test-equal + "cve: one vulnerability" + "probably vulnerable to CVE-2015-1234" + (let ((dummy-vulnerabilities + (lambda (package) + (list (make-struct/no-tail + (@@ (guix cve) ) + "CVE-2015-1234" + (list (cons (package-name package) + (package-version package)))))))) + (single-lint-warning-message + (check-vulnerabilities + (dummy-package "pi" (version "3.14")) + dummy-vulnerabilities)))) expected-value: "probably vulnerable to CVE-2015-1234" actual-value: "probably vulnerable to CVE-2015-1234" result: PASS test-name: cve: one patched vulnerability location: /home/daniel/guix/tests/lint.scm:1117 source: + (test-equal + "cve: one patched vulnerability" + '() + (mock ((guix lint) + package-vulnerabilities + (lambda (package) + (list (make-struct/no-tail + (@@ (guix cve) ) + "CVE-2015-1234" + (list (cons (package-name package) + (package-version package))))))) + (check-vulnerabilities + (dummy-package + "pi" + (version "3.14") + (source + (dummy-origin + (patches (list "/a/b/pi-CVE-2015-1234.patch")))))))) expected-value: () actual-value: () result: PASS test-name: cve: known safe from vulnerability location: /home/daniel/guix/tests/lint.scm:1133 source: + (test-equal + "cve: known safe from vulnerability" + '() + (mock ((guix lint) + package-vulnerabilities + (lambda (package) + (list (make-struct/no-tail + (@@ (guix cve) ) + "CVE-2015-1234" + (list (cons (package-name package) + (package-version package))))))) + (check-vulnerabilities + (dummy-package + "pi" + (version "3.14") + (properties `((lint-hidden-cve "CVE-2015-1234"))))))) expected-value: () actual-value: () result: PASS test-name: cve: vulnerability fixed in replacement version location: /home/daniel/guix/tests/lint.scm:1146 source: + (test-equal + "cve: vulnerability fixed in replacement version" + '() + (mock ((guix lint) + package-vulnerabilities + (lambda (package) + (match (package-version package) + ("0" + (list (make-struct/no-tail + (@@ (guix cve) ) + "CVE-2015-1234" + (list (cons (package-name package) + (package-version package)))))) + ("1" '())))) + (check-vulnerabilities + (dummy-package + "foo" + (version "0") + (replacement (dummy-package "foo" (version "1"))))))) expected-value: () actual-value: () result: PASS test-name: cve: patched vulnerability in replacement location: /home/daniel/guix/tests/lint.scm:1163 source: + (test-equal + "cve: patched vulnerability in replacement" + '() + (mock ((guix lint) + package-vulnerabilities + (lambda (package) + (list (make-struct/no-tail + (@@ (guix cve) ) + "CVE-2015-1234" + (list (cons (package-name package) + (package-version package))))))) + (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")))))))))) expected-value: () actual-value: () result: PASS test-name: formatting: lonely parentheses location: /home/daniel/guix/tests/lint.scm:1181 source: + (test-equal + "formatting: lonely parentheses" + "parentheses feel lonely, move to the previous or next line" + (single-lint-warning-message + (check-formatting + (dummy-package "ugly as hell!")))) expected-value: "parentheses feel lonely, move to the previous or next line" actual-value: "parentheses feel lonely, move to the previous or next line" result: PASS test-name: formatting: tabulation location: /home/daniel/guix/tests/lint.scm:1189 source: + (test-assert + "formatting: tabulation" + (string-match-or-error + "tabulation on line [0-9]+, column [0-9]+" + (single-lint-warning-message + (check-formatting + (dummy-package "leave the tab here:\t"))))) actual-value: #("tabulation on line 1193, column 57" (0 . 34)) result: PASS test-name: formatting: trailing white space location: /home/daniel/guix/tests/lint.scm:1195 source: + (test-assert + "formatting: trailing white space" + (string-match-or-error + "trailing white space .*" + (single-lint-warning-message + (check-formatting (dummy-package "x"))))) actual-value: #("trailing white space on line 1200" (0 . 33)) result: PASS test-name: formatting: long line location: /home/daniel/guix/tests/lint.scm:1202 source: + (test-assert + "formatting: long line" + (string-match-or-error + "line [0-9]+ is way too long \\([0-9]+ characters\\)" + (single-lint-warning-message + (check-formatting (dummy-package "x"))))) actual-value: #("line 1206 is way too long (118 characters)" (0 . 42)) result: PASS test-name: formatting: alright location: /home/daniel/guix/tests/lint.scm:1209 source: + (test-equal + "formatting: alright" + '() + (check-formatting (dummy-package "x"))) expected-value: () actual-value: () result: PASS test-name: archival: missing content location: /home/daniel/guix/tests/lint.scm:1213 source: + (test-assert + "archival: missing content" + (let* ((origin + (origin + (method url-fetch) + (uri "http://example.org/foo.tgz") + (sha256 (make-bytevector 32)))) + (warnings + (with-http-server + '((404 "Not archived.") + (404 "Not in Disarchive database.")) + (parameterize + ((%swh-base-url (%local-url))) + (mock ((guix download) + %disarchive-mirrors + (list (%local-url))) + (check-archival + (dummy-package "x" (source origin)))))))) + (warning-contains? "not archived" warnings))) actual-value: 7 result: PASS test-name: archival: content available location: /home/daniel/guix/tests/lint.scm:1227 source: + (test-equal + "archival: content available" + '() + (let* ((origin + (origin + (method url-fetch) + (uri "http://example.org/foo.tgz") + (sha256 (make-bytevector 32)))) + (content + "{ \"checksums\": {}, \"data_url\": \"xyz\",\n \"length\": 42 }")) + (with-http-server + `((200 ,content)) + (parameterize + ((%swh-base-url (%local-url))) + (check-archival + (dummy-package "x" (source origin))))))) expected-value: () actual-value: () result: PASS test-name: archival: content unavailable but disarchive available location: /home/daniel/guix/tests/lint.scm:1240 source: + (test-equal + "archival: content unavailable but disarchive available" + '() + (let* ((origin + (origin + (method url-fetch) + (uri "http://example.org/foo.tgz") + (sha256 (make-bytevector 32)))) + (disarchive + (object->string + '(disarchive + (version 0) + ... + "swh:1:dir:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))) + (directory + "[ { \"checksums\": {},\n \"dir_id\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\n \"type\": \"file\",\n \"name\": \"README\"\n \"length\": 42 } ]")) + (with-http-server + `((404 "") (200 ,disarchive) (200 ,directory)) + (mock ((guix download) + %disarchive-mirrors + (list (%local-url))) + (parameterize + ((%swh-base-url (%local-url))) + (check-archival + (dummy-package "x" (source origin)))))))) expected-value: () actual-value: () result: PASS test-name: archival: missing revision location: /home/daniel/guix/tests/lint.scm:1263 source: + (test-assert + "archival: missing revision" + (let* ((origin + (origin + (method git-fetch) + (uri (git-reference + (url "http://example.org/foo.git") + (commit + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))) + (sha256 (make-bytevector 32)))) + (save "{ \"origin_url\": \"http://example.org/foo.git\",\n \"save_request_date\": \"2014-11-17T22:09:38+01:00\",\n \"save_request_status\": \"accepted\",\n \"save_task_status\": \"scheduled\" }") + (warnings + (with-http-server + `((404 "No revision.") + (404 "No origin.") + (200 ,save)) + (parameterize + ((%swh-base-url (%local-url))) + (check-archival + (dummy-package "x" (source origin))))))) + (warning-contains? "scheduled" warnings))) actual-value: 0 result: PASS test-name: archival: revision available location: /home/daniel/guix/tests/lint.scm:1282 source: + (test-equal + "archival: revision available" + '() + (let* ((origin + (origin + (method git-fetch) + (uri (git-reference + (url "http://example.org/foo.git") + (commit + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))) + (sha256 (make-bytevector 32)))) + (revision + "{ \"author\": {}, \"parents\": [],\n \"date\": \"2014-11-17T22:09:38+01:00\" }")) + (with-http-server + `((200 ,revision)) + (parameterize + ((%swh-base-url (%local-url))) + (check-archival + (dummy-package "x" (source origin))))))) expected-value: () actual-value: () result: PASS test-name: archival: rate limit reached location: /home/daniel/guix/tests/lint.scm:1297 source: + (test-assert + "archival: rate limit reached" + (let* ((origin + (origin + (method url-fetch) + (uri "http://example.org/foo.tgz") + (sha256 (make-bytevector 32)))) + (too-many + (build-response + #:code + 429 + #:reason-phrase + "Too many requests" + #:headers + '((x-ratelimit-remaining . "0") + (x-ratelimit-reset . "3000000000")))) + (warnings + (with-http-server + `((,too-many "Rate limit reached.")) + (parameterize + ((%swh-base-url (%local-url))) + (append-map + (lambda (name) + (check-archival + (dummy-package name (source origin)))) + '("x" "y" "z")))))) + (string-contains + (single-lint-warning-message warnings) + "rate limit reached"))) actual-value: 18 result: PASS test-name: haskell-stackage location: /home/daniel/guix/tests/lint.scm:1318 source: + (test-assert + "haskell-stackage" + (let* ((stackage + (string-append + "{ \"packages\": [{" + " \"name\":\"x\"," + " \"version\":\"1.0\" }]}")) + (packages + (map (lambda (version) + (dummy-package + (string-append "ghc-x") + (version version) + (source + (dummy-origin + (method url-fetch) + (uri (string-append + "https://hackage.haskell.org/package/" + "x-" + version + "/x-" + version + ".tar.gz")))))) + '("0.9" "1.0" "2.0"))) + (warnings + (pk (with-http-server + `((200 ,stackage) + (200 "name: x\nversion: 1.0\n") + (200 "name: x\nversion: 1.0\n") + (200 "name: x\nversion: 1.0\n")) + (parameterize + ((%hackage-url (%local-url)) + (%stackage-url (%local-url))) + (append-map check-haskell-stackage packages)))))) + (match warnings + (((? lint-warning? warning)) + (and (string=? + (package-version (lint-warning-package warning)) + "2.0") + (string-contains + (lint-warning-message warning) + "ahead of Stackage LTS version")))))) actual-value: #f actual-error: + (out-of-range + "list-ref" + "Argument ~A out of range: ~S" + (2 2) + (2)) result: FAIL fetching CVE database for 2021... fetching CVE database for 2020... fetching CVE database for 2019... fetching CVE database for 2018... SKIP: tests/pypi ================ test-name: guix-package->pypi-name, old URL style location: /home/daniel/guix/tests/pypi.scm:125 source: + (test-equal + "guix-package->pypi-name, old URL style" + "psutil" + (guix-package->pypi-name + (dummy-package + "foo" + (source + (dummy-origin + (uri "https://pypi.org/packages/source/p/psutil/psutil-4.3.0.tar.gz")))))) expected-value: "psutil" actual-value: "psutil" result: PASS test-name: guix-package->pypi-name, new URL style location: /home/daniel/guix/tests/pypi.scm:133 source: + (test-equal + "guix-package->pypi-name, new URL style" + "certbot" + (guix-package->pypi-name + (dummy-package + "foo" + (source + (dummy-origin + (uri "https://pypi.org/packages/a2/3b/4756e6a0ceb14e084042a2a65c615d68d25621c6fd446d0fc10d14c4ce7d/certbot-0.8.1.tar.gz")))))) expected-value: "certbot" actual-value: "certbot" result: PASS test-name: guix-package->pypi-name, several URLs location: /home/daniel/guix/tests/pypi.scm:141 source: + (test-equal + "guix-package->pypi-name, several URLs" + "cram" + (guix-package->pypi-name + (dummy-package + "foo" + (source + (dummy-origin + (uri (list "https://bitheap.org/cram/cram-0.7.tar.gz" + (pypi-uri "cram" "0.7")))))))) expected-value: "cram" actual-value: "cram" result: PASS test-name: specification->requirement-name location: /home/daniel/guix/tests/pypi.scm:150 source: + (test-equal + "specification->requirement-name" + '("Fizzy" + "PickyThing" + "SomethingWithMarker" + "requests" + "pip") + (map specification->requirement-name + test-specifications)) expected-value: ("Fizzy" "PickyThing" "SomethingWithMarker" "requests" "pip") actual-value: ("Fizzy" "PickyThing" "SomethingWithMarker" "requests" "pip") result: PASS test-name: parse-requires.txt location: /home/daniel/guix/tests/pypi.scm:154 source: + (test-equal + "parse-requires.txt" + (list '("foo" "bar") '("pytest")) + (mock ((ice-9 ports) + call-with-input-file + call-with-input-string) + (parse-requires.txt test-requires.txt))) expected-value: (("foo" "bar") ("pytest")) actual-value: (("foo" "bar") ("pytest")) result: PASS test-name: parse-requires.txt - Beaker location: /home/daniel/guix/tests/pypi.scm:160 source: + (test-equal + "parse-requires.txt - Beaker" + (list '() '("Mock" "coverage")) + (mock ((ice-9 ports) + call-with-input-file + call-with-input-string) + (parse-requires.txt test-requires.txt-beaker))) expected-value: (() ("Mock" "coverage")) actual-value: (() ("Mock" "coverage")) result: PASS test-name: parse-wheel-metadata, with extras location: /home/daniel/guix/tests/pypi.scm:166 source: + (test-equal + "parse-wheel-metadata, with extras" + (list '("wrapt" "bar") '("tox" "bumpversion")) + (mock ((ice-9 ports) + call-with-input-file + call-with-input-string) + (parse-wheel-metadata test-metadata-with-extras))) expected-value: (("wrapt" "bar") ("tox" "bumpversion")) actual-value: (("wrapt" "bar") ("tox" "bumpversion")) result: PASS test-name: parse-wheel-metadata, with extras - Jedi location: /home/daniel/guix/tests/pypi.scm:172 source: + (test-equal + "parse-wheel-metadata, with extras - Jedi" + (list '("parso") '("pytest")) + (mock ((ice-9 ports) + call-with-input-file + call-with-input-string) + (parse-wheel-metadata + test-metadata-with-extras-jedi))) expected-value: (("parso") ("pytest")) actual-value: (("parso") ("pytest")) result: PASS test-name: pypi->guix-package, no wheel location: /home/daniel/guix/tests/pypi.scm:178 source: + (test-assert + "pypi->guix-package, no wheel" + (mock ((guix import utils) + url-fetch + (lambda (url file-name) + (match url + ("https://example.com/foo-1.0.0.tar.gz" + (begin + (mkdir-p "foo-1.0.0/src/bizarre.egg-info") + (with-output-to-file + "foo-1.0.0/src/bizarre.egg-info/requires.txt" + (lambda () (display test-requires.txt))) + (parameterize + ((current-output-port (%make-void-port "rw+"))) + (system* "tar" "czvf" file-name "foo-1.0.0/")) + (delete-file-recursively "foo-1.0.0") + (set! test-source-hash + (call-with-input-file file-name port-sha256)))) + ("https://example.com/foo-1.0.0-py2.py3-none-any.whl" + #f) + (_ (error "Unexpected URL: " url))))) + (mock ((guix http-client) + http-fetch + (lambda (url . rest) + (match url + ("https://pypi.org/pypi/foo/json" + (values + (open-input-string test-json) + (string-length test-json))) + ("https://example.com/foo-1.0.0-py2.py3-none-any.whl" + #f) + (_ (error "Unexpected URL: " url))))) + (match (pypi->guix-package "foo") + (('package + ('name "python-foo") + ('version "1.0.0") + ('source + ('origin + ('method 'url-fetch) + ('uri ('pypi-uri "foo" 'version)) + ('sha256 ('base32 (? string? hash))))) + ('build-system 'python-build-system) + ('propagated-inputs + ('quasiquote + (("python-bar" ('unquote 'python-bar)) + ("python-foo" ('unquote 'python-foo))))) + ('native-inputs + ('quasiquote + (("python-pytest" ('unquote 'python-pytest))))) + ('home-page "http://example.com") + ('synopsis "summary") + ('description "summary") + ('license 'license:lgpl2.0)) + (string=? + (bytevector->nix-base32-string test-source-hash) + hash)) + (x (pk 'fail x #f)))))) actual-value: #t result: PASS test-name: pypi->guix-package, wheels location: /home/daniel/guix/tests/pypi.scm:234 source: + (test-assert + "pypi->guix-package, wheels" + (mock ((guix import utils) + url-fetch + (lambda (url file-name) + (match url + ("https://example.com/foo-1.0.0.tar.gz" + (begin + (mkdir-p "foo-1.0.0/foo.egg-info/") + (with-output-to-file + "foo-1.0.0/foo.egg-info/requires.txt" + (lambda () + (display + "wrong data to make sure we're testing wheels "))) + (parameterize + ((current-output-port (%make-void-port "rw+"))) + (system* "tar" "czvf" file-name "foo-1.0.0/")) + (delete-file-recursively "foo-1.0.0") + (set! test-source-hash + (call-with-input-file file-name port-sha256)))) + ("https://example.com/foo-1.0.0-py2.py3-none-any.whl" + (begin + (mkdir "foo-1.0.0.dist-info") + (with-output-to-file + "foo-1.0.0.dist-info/METADATA" + (lambda () (display test-metadata))) + (let ((zip-file (string-append file-name ".zip"))) + (system* + "zip" + "-q" + zip-file + "foo-1.0.0.dist-info/METADATA") + (rename-file zip-file file-name)) + (delete-file-recursively "foo-1.0.0.dist-info"))) + (_ (error "Unexpected URL: " url))))) + (mock ((guix http-client) + http-fetch + (lambda (url . rest) + (match url + ("https://pypi.org/pypi/foo/json" + (values + (open-input-string test-json) + (string-length test-json))) + ("https://example.com/foo-1.0.0-py2.py3-none-any.whl" + #f) + (_ (error "Unexpected URL: " url))))) + (invalidate-memoization! pypi->guix-package) + (match (pypi->guix-package "foo") + (('package + ('name "python-foo") + ('version "1.0.0") + ('source + ('origin + ('method 'url-fetch) + ('uri ('pypi-uri "foo" 'version)) + ('sha256 ('base32 (? string? hash))))) + ('build-system 'python-build-system) + ('propagated-inputs + ('quasiquote + (("python-bar" ('unquote 'python-bar)) + ("python-baz" ('unquote 'python-baz))))) + ('native-inputs + ('quasiquote + (("python-pytest" ('unquote 'python-pytest))))) + ('home-page "http://example.com") + ('synopsis "summary") + ('description "summary") + ('license 'license:lgpl2.0)) + (string=? + (bytevector->nix-base32-string test-source-hash) + hash)) + (x (pk 'fail x #f)))))) result: SKIP test-name: pypi->guix-package, no usable requirement file. location: /home/daniel/guix/tests/pypi.scm:302 source: + (test-assert + "pypi->guix-package, no usable requirement file." + (mock ((guix import utils) + url-fetch + (lambda (url file-name) + (match url + ("https://example.com/foo-1.0.0.tar.gz" + (mkdir-p "foo-1.0.0/foo.egg-info/") + (parameterize + ((current-output-port (%make-void-port "rw+"))) + (system* "tar" "czvf" file-name "foo-1.0.0/")) + (delete-file-recursively "foo-1.0.0") + (set! test-source-hash + (call-with-input-file file-name port-sha256))) + ("https://example.com/foo-1.0.0-py2.py3-none-any.whl" + #f) + (_ (error "Unexpected URL: " url))))) + (mock ((guix http-client) + http-fetch + (lambda (url . rest) + (match url + ("https://pypi.org/pypi/foo/json" + (values + (open-input-string test-json) + (string-length test-json))) + ("https://example.com/foo-1.0.0-py2.py3-none-any.whl" + #f) + (_ (error "Unexpected URL: " url))))) + (invalidate-memoization! pypi->guix-package) + (match (pypi->guix-package "foo") + (('package + ('name "python-foo") + ('version "1.0.0") + ('source + ('origin + ('method 'url-fetch) + ('uri ('pypi-uri "foo" 'version)) + ('sha256 ('base32 (? string? hash))))) + ('build-system 'python-build-system) + ('home-page "http://example.com") + ('synopsis "summary") + ('description "summary") + ('license 'license:lgpl2.0)) + (string=? + (bytevector->nix-base32-string test-source-hash) + hash)) + (x (pk 'fail x #f)))))) actual-value: #t result: PASS warning: Cannot guess requirements from source archive: no requires.txt file found. RUN: tests/services/configuration ================================= test-name: default value, no serialization location: /home/daniel/guix/tests/services/configuration.scm:39 source: + (test-equal + "default value, no serialization" + 80 + (port-configuration-port (port-configuration))) expected-value: 80 actual-value: 80 result: PASS test-name: default value, custom serializer location: /home/daniel/guix/tests/services/configuration.scm:46 source: + (test-equal + "default value, custom serializer" + 80 + (port-configuration-cs-port + (port-configuration-cs))) expected-value: 80 actual-value: 80 result: PASS test-name: no default value, provided location: /home/daniel/guix/tests/services/configuration.scm:54 source: + (test-equal + "no default value, provided" + 55 + (port-configuration-ndv-port + (port-configuration-ndv (port 55)))) expected-value: 55 actual-value: 55 result: PASS test-name: no default value, not provided location: /home/daniel/guix/tests/services/configuration.scm:59 source: + (test-assert + "no default value, not provided" + (guard (c ((configuration-error? c) #t)) + (port-configuration-ndv-port + (port-configuration-ndv)))) actual-value: #t result: PASS test-name: serialize-configuration location: /home/daniel/guix/tests/services/configuration.scm:70 source: + (test-assert + "serialize-configuration" + (gexp? (let ((config (serializable-configuration))) + (serialize-configuration + config + serializable-configuration-fields)))) actual-value: #t result: PASS test-name: serialize-configuration with no-serialization location: /home/daniel/guix/tests/services/configuration.scm:79 source: + (test-assert + "serialize-configuration with no-serialization" + (not (false-if-exception + (let ((config (serializable-configuration))) + (serialize-configuration + config + serializable-configuration-fields))))) actual-value: #t result: PASS test-name: serialize-configuration with prefix location: /home/daniel/guix/tests/services/configuration.scm:92 source: + (test-assert + "serialize-configuration with prefix" + (gexp? (let ((config (configuration-with-prefix))) + (serialize-configuration + config + configuration-with-prefix-fields)))) actual-value: #t result: PASS test-name: maybe value serialization location: /home/daniel/guix/tests/services/configuration.scm:109 source: + (test-equal + "maybe value serialization" + "port=80" + (serialize-maybe-number "port" 80)) expected-value: "port=80" actual-value: "port=80" result: PASS test-name: maybe value without serialization no procedure bound location: /home/daniel/guix/tests/services/configuration.scm:119 source: + (test-assert + "maybe value without serialization no procedure bound" + (not (defined? 'serialize-maybe-string))) actual-value: #t result: PASS SKIP: tests/upstream ==================== test-name: coalesce-sources same version location: /home/daniel/guix/tests/upstream.scm:30 source: + (test-equal + "coalesce-sources same version" + (list (upstream-source + (package "foo") + (version "1") + (urls '("ftp://example.org/foo-1.tar.xz" + "ftp://example.org/foo-1.tar.gz")) + (signature-urls + '("ftp://example.org/foo-1.tar.xz.sig" + "ftp://example.org/foo-1.tar.gz.sig")))) + (coalesce-sources + (list (upstream-source + (package "foo") + (version "1") + (urls '("ftp://example.org/foo-1.tar.gz")) + (signature-urls + '("ftp://example.org/foo-1.tar.gz.sig"))) + (upstream-source + (package "foo") + (version "1") + (urls '("ftp://example.org/foo-1.tar.xz")) + (signature-urls + '("ftp://example.org/foo-1.tar.xz.sig")))))) result: SKIP RUN: tests/offload ================== test-name: #f location: /home/daniel/guix/tests/offload.scm:55 source: + (test-assert + (machine-matches? + (deprecated-build-machine "i686-linux") + (build-requirements (system "i686-linux")))) actual-value: #t result: PASS test-name: #f location: /home/daniel/guix/tests/offload.scm:60 source: + (test-assert + (machine-matches? + (new-build-machine '("i686-linux")) + (build-requirements (system "i686-linux")))) actual-value: #t result: PASS test-name: #f location: /home/daniel/guix/tests/offload.scm:66 source: + (test-assert + (machine-matches? + (new-build-machine + '("armhf-linux" + "aarch64-linux" + "i686-linux" + "x86_64-linux")) + (build-requirements (system "armhf-linux")))) actual-value: #t result: PASS /home/daniel/guix/tests/offload.scm:41:2: warning: The 'system' field is deprecated, please use 'systems' instead.