all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#24060: Test failure: tests/publish.scm
@ 2016-07-24  9:31 Chris Marusich
  2016-07-24 23:01 ` Chris Marusich
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Chris Marusich @ 2016-07-24  9:31 UTC (permalink / raw)
  To: 24060


[-- Attachment #1.1: Type: text/plain, Size: 1617 bytes --]

Hi,

I've noticed that tests/publish.scm fails when run with the other tests
in parallel (see attached test-suite.log file).  Specifically, it fails
when I run "make -j check".  It passes when I run "make check".  It
passes when I run "make -j check TESTS=tests/publish.scm".  It also
passes when I run "make check TESTS=tests/publish.scm".  Here's the
failure message:

--8<---------------cut here---------------start------------->8---
test-name: /nar/gzip/*
location: /home/marusich/guix/tests/publish.scm:163
source:
+ (test-equal
+   "/nar/gzip/*"
+   "bar"
+   (call-with-temporary-output-file
+     (lambda (temp port)
+       (let ((nar (http-get-port
+                    (publish-uri
+                      (string-append "/nar/gzip/" (basename %item))))))
+         (call-with-gzip-input-port
+           nar
+           (cut restore-file <> temp)))
+       (call-with-input-file temp read-string))))
GET /nar/gzip/z8qsg9bmmjzgfi0bbgls1wxd0wmhhm2i-item
expected-value: bar
actual-value: #f
actual-error:
+ (srfi-34
+   #<condition &nar-error [file: "/tmp/guix-file.7fzEA2" port: #<closed: r6rs-custom-binary-input-port 0>] 27616f0>)
result: FAIL
--8<---------------cut here---------------end--------------->8---

I'm using GuixSD with Guix v0.10.0.  I observed this failure using
commit 8d63dddac11882ef85283bda259e0142b65ae28f.  I built guix with
dependencies provided via "guix environment guix"; however, since there
are two versions of guix defined gnu/packages/package-management.scm,
I'm not sure which one is being used to determine dependencies.

-- 
Chris

[-- Attachment #1.2: test-suite.log --]
[-- Type: application/octet-stream, Size: 43779 bytes --]

=======================================
   GNU Guix 0.10.0: ./test-suite.log
=======================================

# TOTAL: 600
# PASS:  592
# SKIP:  7
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

SKIP: tests/base32
==================

sh: nix-hash: command not found
test-name: bytevector->base32-string
location: /home/marusich/guix/tests/base32.scm:48
source:
+ (test-assert
+   "bytevector->base32-string"
+   (fold (lambda (bv expected result)
+           (and result
+                (string=?
+                  (bytevector->base32-string bv)
+                  expected)))
+         #t
+         (map string->utf8
+              '("" "f" "fo" "foo" "foob" "fooba" "foobar"))
+         '(""
+           "my"
+           "mzxq"
+           "mzxw6"
+           "mzxw6yq"
+           "mzxw6ytb"
+           "mzxw6ytboi")))
actual-value: #t
result: PASS

test-name: base32-string->bytevector
location: /home/marusich/guix/tests/base32.scm:65
source:
+ (test-assert
+   "base32-string->bytevector"
+   (every (lambda (bv)
+            (equal?
+              (base32-string->bytevector
+                (bytevector->base32-string bv))
+              bv))
+          (map string->utf8
+               '("" "f" "fo" "foo" "foob" "fooba" "foobar"))))
actual-value: #t
result: PASS

test-name: nix-base32-string->bytevector
location: /home/marusich/guix/tests/base32.scm:73
source:
+ (test-assert
+   "nix-base32-string->bytevector"
+   (every (lambda (bv)
+            (equal?
+              (nix-base32-string->bytevector
+                (bytevector->nix-base32-string bv))
+              bv))
+          (map string->utf8
+               '("" "f" "fo" "foo" "foob" "fooba" "foobar"))))
actual-value: #t
result: PASS

test-name: &invalid-base32-character
location: /home/marusich/guix/tests/base32.scm:81
source:
+ (test-equal
+   "&invalid-base32-character"
+   #\e
+   (guard (c ((invalid-base32-character? c)
+              (invalid-base32-character-value c)))
+          (nix-base32-string->bytevector
+            (string-append (make-string 51 #\a) "e"))))
expected-value: e
actual-value: e
result: PASS

test-name: sha256 & bytevector->nix-base32-string
location: /home/marusich/guix/tests/base32.scm:92
source:
+ (test-assert
+   "sha256 & bytevector->nix-base32-string"
+   (let ((file (search-path %load-path "tests/test.drv")))
+     (equal?
+       (bytevector->nix-base32-string
+         (sha256
+           (call-with-input-file file get-bytevector-all)))
+       (let* ((c (format
+                   #f
+                   "~a --type sha256 --base32 --flat \"~a\""
+                   %nix-hash
+                   file))
+              (p (open-input-pipe c))
+              (l (read-line p)))
+         (close-pipe p)
+         l))))
result: SKIP


SKIP: tests/cpio
================

test-name: file->cpio-header + write-cpio-header + read-cpio-header
location: /home/marusich/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/marusich/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

random seed for tests: 1469189158

SKIP: tests/snix
================

test-name: factorize-uri
location: /home/marusich/guix/tests/snix.scm:36
source:
+ (test-assert
+   "factorize-uri"
+   (every?
+     (match-lambda
+       ((uri version '-> expected)
+        (equal? (factorize-uri uri version) expected)))
+     '(("http://example.com/foo.tgz"
+        "1.0"
+        ->
+        "http://example.com/foo.tgz")
+       ("http://example.com/foo-2.8.tgz"
+        "2.8"
+        ->
+        ("http://example.com/foo-" version ".tgz"))
+       ("http://example.com/2.8/foo-2.8.tgz"
+        "2.8"
+        ->
+        ("http://example.com/"
+         version
+         "/foo-"
+         version
+         ".tgz")))))
actual-value: #t
result: PASS

test-name: nixpkgs->guix-package
location: /home/marusich/guix/tests/snix.scm:54
source:
+ (test-assert
+   "nixpkgs->guix-package"
+   (match (nixpkgs->guix-package
+            %nixpkgs-directory
+            "guile")
+          (('package
+            ('name "guile")
+            ('version (? string?))
+            ('source ('origin _ ...))
+            ('build-system _)
+            ('inputs ('quasiquote (inputs ...)))
+            ('propagated-inputs ('quasiquote (pinputs ...)))
+            ('home-page (? string?))
+            ('synopsis (? string?))
+            ('description (? string?))
+            ('license (? symbol?)))
+           (and (member '("libffi" ,libffi) inputs)
+                (member '("gmp" ,gmp) pinputs)
+                #t))
+          (x (pk 'fail x #f))))
result: SKIP


SKIP: tests/syscalls
====================

test-name: mount, ENOENT
location: /home/marusich/guix/tests/syscalls.scm:38
source:
+ (test-equal
+   "mount, ENOENT"
+   ENOENT
+   (catch 'system-error
+          (lambda ()
+            (mount "/dev/null" "/does-not-exist" "ext2")
+            #f)
+          (compose system-error-errno list)))
expected-value: 2
actual-value: 2
result: PASS

test-name: umount, ENOENT/EPERM
location: /home/marusich/guix/tests/syscalls.scm:46
source:
+ (test-assert
+   "umount, ENOENT/EPERM"
+   (catch 'system-error
+          (lambda () (umount "/does-not-exist") #f)
+          (lambda args
+            (memv (system-error-errno args)
+                  (list EPERM ENOENT)))))
actual-value: (1 2)
result: PASS

test-name: mount-points
location: /home/marusich/guix/tests/syscalls.scm:55
source:
+ (test-assert
+   "mount-points"
+   (any (cute member <> (mount-points))
+        '("/" "/proc" "/sys" "/dev")))
actual-value: (/ /sys/fs/cgroup /sys/fs/cgroup/hugetlb /sys/fs/cgroup/perf_event /sys/fs/cgroup/blkio /sys/fs/cgroup/freezer /sys/fs/cgroup/devices /sys/fs/cgroup/memory /sys/fs/cgroup/cpuacct /sys/fs/cgroup/cpu /sys/fs/cgroup/cpuset /sys/fs/cgroup/elogind /run/user /run/systemd /gnu/store /dev/shm /dev/pts /home /run/user/1000)
result: PASS

test-name: swapon, ENOENT/EPERM
location: /home/marusich/guix/tests/syscalls.scm:61
source:
+ (test-assert
+   "swapon, ENOENT/EPERM"
+   (catch 'system-error
+          (lambda () (swapon "/does-not-exist") #f)
+          (lambda args
+            (memv (system-error-errno args)
+                  (list EPERM ENOENT)))))
actual-value: (1 2)
result: PASS

test-name: swapoff, ENOENT/EINVAL/EPERM
location: /home/marusich/guix/tests/syscalls.scm:69
source:
+ (test-assert
+   "swapoff, ENOENT/EINVAL/EPERM"
+   (catch 'system-error
+          (lambda () (swapoff "/does-not-exist") #f)
+          (lambda args
+            (memv (system-error-errno args)
+                  (list EPERM EINVAL ENOENT)))))
actual-value: (1 22 2)
result: PASS

test-name: mkdtemp!
location: /home/marusich/guix/tests/syscalls.scm:77
source:
+ (test-assert
+   "mkdtemp!"
+   (let* ((tmp (or (getenv "TMPDIR") "/tmp"))
+          (dir (mkdtemp!
+                 (string-append tmp "/guix-test-XXXXXX"))))
+     (and (file-exists? dir) (begin (rmdir dir) #t))))
actual-value: #t
result: PASS

test-name: statfs, ENOENT
location: /home/marusich/guix/tests/syscalls.scm:85
source:
+ (test-equal
+   "statfs, ENOENT"
+   ENOENT
+   (catch 'system-error
+          (lambda () (statfs "/does-not-exist"))
+          (compose system-error-errno list)))
expected-value: 2
actual-value: 2
result: PASS

test-name: statfs
location: /home/marusich/guix/tests/syscalls.scm:92
source:
+ (test-assert
+   "statfs"
+   (let ((fs (statfs "/")))
+     (and (file-system? fs)
+          (> (file-system-block-size fs) 0)
+          (>= (file-system-blocks-available fs) 0)
+          (>= (file-system-blocks-free fs)
+              (file-system-blocks-available fs)))))
actual-value: #t
result: PASS

test-name: clone
location: /home/marusich/guix/tests/syscalls.scm:109
source:
+ (test-assert
+   "clone"
+   (match (clone (logior CLONE_NEWUSER SIGCHLD))
+          (0 (primitive-exit 42))
+          (pid (and (not (equal?
+                           (readlink (user-namespace pid))
+                           (readlink (user-namespace (getpid)))))
+                    (match (waitpid pid)
+                           ((_ . status) (= 42 (status:exit-val status))))))))
actual-value: #t
result: PASS

test-name: setns
location: /home/marusich/guix/tests/syscalls.scm:122
source:
+ (test-assert
+   "setns"
+   (match (clone (logior CLONE_NEWUSER SIGCHLD))
+          (0 (primitive-exit 0))
+          (clone-pid
+            (match (pipe)
+                   ((in . out)
+                    (match (primitive-fork)
+                           (0
+                            (close in)
+                            (call-with-input-file
+                              (user-namespace clone-pid)
+                              (lambda (port) (setns (port->fdes port) 0)))
+                            (write 'done out)
+                            (close out)
+                            (primitive-exit 0))
+                           (fork-pid
+                             (close out)
+                             (read in)
+                             (let ((result
+                                     (and (equal?
+                                            (readlink
+                                              (user-namespace clone-pid))
+                                            (readlink
+                                              (user-namespace fork-pid))))))
+                               (waitpid clone-pid)
+                               (waitpid fork-pid)
+                               result))))))))
actual-value: #t
result: PASS

test-name: pivot-root
location: /home/marusich/guix/tests/syscalls.scm:151
source:
+ (test-assert
+   "pivot-root"
+   (match (pipe)
+          ((in . out)
+           (match (clone (logior CLONE_NEWUSER CLONE_NEWNS SIGCHLD))
+                  (0
+                   (close in)
+                   (call-with-temporary-directory
+                     (lambda (root)
+                       (let ((put-old (string-append root "/real-root")))
+                         (mount "none" root "tmpfs")
+                         (mkdir put-old)
+                         (call-with-output-file
+                           (string-append root "/test")
+                           (lambda (port) (display "testing\n" port)))
+                         (pivot-root root put-old)
+                         (write (file-exists? "/test") out)
+                         (close out))))
+                   (primitive-exit 0))
+                  (pid (close out)
+                       (let ((result (read in)))
+                         (close in)
+                         (and (zero? (match (waitpid pid)
+                                            ((_ . status)
+                                             (status:exit-val status))))
+                              (eq? #t result))))))))
actual-value: #t
result: PASS

test-name: fcntl-flock wait
location: /home/marusich/guix/tests/syscalls.scm:180
source:
+ (test-equal
+   "fcntl-flock wait"
+   42
+   (let ((file (open-file temp-file "w0b")))
+     (fcntl-flock file 'write-lock)
+     (match (primitive-fork)
+            (0
+             (dynamic-wind
+               (const #t)
+               (lambda ()
+                 (let ((file (open-file temp-file "r0b")))
+                   (fcntl-flock file 'read-lock)
+                   (primitive-exit (read file)))
+                 (primitive-exit 1))
+               (lambda () (primitive-exit 2))))
+            (pid (display "hello, world!" file)
+                 (force-output file)
+                 (sleep 1)
+                 (seek file 0 SEEK_SET)
+                 (truncate-file file 0)
+                 (write 42 file)
+                 (force-output file)
+                 (fcntl-flock file 'unlock)
+                 (match (waitpid pid)
+                        ((_ . status)
+                         (let ((result (status:exit-val status)))
+                           (close-port file)
+                           result)))))))
expected-value: 42
actual-value: 42
result: PASS

test-name: fcntl-flock non-blocking
location: /home/marusich/guix/tests/syscalls.scm:219
source:
+ (test-equal
+   "fcntl-flock non-blocking"
+   EAGAIN
+   (match (pipe)
+          ((input . output)
+           (match (primitive-fork)
+                  (0
+                   (dynamic-wind
+                     (const #t)
+                     (lambda ()
+                       (close-port output)
+                       (read-char input)
+                       (let ((file (open-file temp-file "w0")))
+                         (catch 'flock-error
+                                (lambda ()
+                                  (fcntl-flock file 'write-lock #:wait? #f))
+                                (lambda (key errno)
+                                  (primitive-exit (pk 'errno errno)))))
+                       (primitive-exit -1))
+                     (lambda () (primitive-exit -2))))
+                  (pid (close-port input)
+                       (let ((file (open-file temp-file "w0")))
+                         (fcntl-flock file 'write-lock)
+                         (write 'green-light output)
+                         (force-output output)
+                         (match (waitpid pid)
+                                ((_ . status)
+                                 (let ((result (status:exit-val status)))
+                                   (fcntl-flock file 'unlock)
+                                   (close-port file)
+                                   result)))))))))

;;; (errno 11)
expected-value: 11
actual-value: 11
result: PASS

test-name: all-network-interface-names
location: /home/marusich/guix/tests/syscalls.scm:261
source:
+ (test-assert
+   "all-network-interface-names"
+   (match (all-network-interface-names)
+          (((? string? names) ..1) (member "lo" names))))
actual-value: (lo enp0s25 wlp2s0)
result: PASS

test-name: network-interface-names
location: /home/marusich/guix/tests/syscalls.scm:266
source:
+ (test-assert
+   "network-interface-names"
+   (match (network-interface-names)
+          (((? string? names) ..1)
+           (lset<=
+             string=?
+             names
+             (all-network-interface-names)))))
actual-value: #t
result: PASS

test-name: network-interface-flags
location: /home/marusich/guix/tests/syscalls.scm:271
source:
+ (test-assert
+   "network-interface-flags"
+   (let* ((sock (socket AF_INET SOCK_STREAM 0))
+          (flags (network-interface-flags sock "lo")))
+     (close-port sock)
+     (and (not (zero? (logand flags IFF_LOOPBACK)))
+          (not (zero? (logand flags IFF_UP))))))
actual-value: #t
result: PASS

test-name: loopback-network-interface?
location: /home/marusich/guix/tests/syscalls.scm:278
source:
+ (test-equal
+   "loopback-network-interface?"
+   ENODEV
+   (and (loopback-network-interface? "lo")
+        (catch 'system-error
+               (lambda ()
+                 (loopback-network-interface? "nonexistent")
+                 #f)
+               (lambda args (system-error-errno args)))))
expected-value: 19
actual-value: 19
result: PASS

test-name: set-network-interface-flags
location: /home/marusich/guix/tests/syscalls.scm:289
source:
+ (test-assert
+   "set-network-interface-flags"
+   (let ((sock (socket AF_INET SOCK_STREAM 0)))
+     (catch 'system-error
+            (lambda ()
+              (set-network-interface-flags sock "lo" IFF_UP))
+            (lambda args
+              (close-port sock)
+              (memv (system-error-errno args)
+                    (list EPERM EACCES))))))
actual-value: (1 13)
result: PASS

test-name: network-interface-address lo
location: /home/marusich/guix/tests/syscalls.scm:299
source:
+ (test-equal
+   "network-interface-address lo"
+   (make-socket-address
+     AF_INET
+     (inet-pton AF_INET "127.0.0.1")
+     0)
+   (let* ((sock (socket AF_INET SOCK_STREAM 0))
+          (addr (network-interface-address sock "lo")))
+     (close-port sock)
+     addr))
expected-value: #(2 2130706433 0)
actual-value: #(2 2130706433 0)
result: PASS

test-name: set-network-interface-address
location: /home/marusich/guix/tests/syscalls.scm:307
source:
+ (test-assert
+   "set-network-interface-address"
+   (let ((sock (socket AF_INET SOCK_STREAM 0)))
+     (catch 'system-error
+            (lambda ()
+              (set-network-interface-address
+                sock
+                "nonexistent"
+                (make-socket-address
+                  AF_INET
+                  (inet-pton AF_INET "127.12.14.15")
+                  0)))
+            (lambda args
+              (close-port sock)
+              (memv (system-error-errno args)
+                    (list EPERM EACCES))))))
actual-value: (1 13)
result: PASS

test-name: network-interfaces returns one or more interfaces
location: /home/marusich/guix/tests/syscalls.scm:321
source:
+ (test-equal
+   "network-interfaces returns one or more interfaces"
+   '(#t #t #t)
+   (match (network-interfaces)
+          ((interfaces ..1)
+           (list (every interface? interfaces)
+                 (every string? (map interface-name interfaces))
+                 (every (lambda (sockaddr)
+                          (or (vector? sockaddr) (not sockaddr)))
+                        (map interface-address interfaces))))))
expected-value: (#t #t #t)
actual-value: (#t #t #t)
result: PASS

test-name: network-interfaces returns "lo"
location: /home/marusich/guix/tests/syscalls.scm:333
source:
+ (test-equal
+   "network-interfaces returns \"lo\""
+   (list #t
+         (make-socket-address
+           AF_INET
+           (inet-pton AF_INET "127.0.0.1")
+           0))
+   (match (filter
+            (lambda (interface)
+              (string=? "lo" (interface-name interface)))
+            (network-interfaces))
+          ((loopbacks ..1)
+           (list (every (lambda (lo)
+                          (not (zero? (logand
+                                        IFF_LOOPBACK
+                                        (interface-flags lo)))))
+                        loopbacks)
+                 (match (find (lambda (lo)
+                                (= AF_INET
+                                   (sockaddr:fam (interface-address lo))))
+                              loopbacks)
+                        (#f #f)
+                        (lo (interface-address lo)))))))
expected-value: (#t #(2 2130706433 0))
actual-value: (#t #(2 2130706433 0))
result: PASS

test-name: tcgetattr ENOTTY
location: /home/marusich/guix/tests/syscalls.scm:348
source:
+ (test-equal
+   "tcgetattr ENOTTY"
+   ENOTTY
+   (catch 'system-error
+          (lambda ()
+            (call-with-input-file
+              "/dev/null"
+              (lambda (port) (tcgetattr (fileno port)))))
+          (compose system-error-errno list)))
expected-value: 25
actual-value: 25
result: PASS

test-name: tcgetattr
location: /home/marusich/guix/tests/syscalls.scm:362
source:
+ (test-assert
+   "tcgetattr"
+   (let ((termios (tcgetattr 0)))
+     (and (termios? termios)
+          (> (termios-input-speed termios) 0)
+          (> (termios-output-speed termios) 0))))
result: SKIP

test-name: tcsetattr
location: /home/marusich/guix/tests/syscalls.scm:368
source:
+ (test-assert
+   "tcsetattr"
+   (let ((first (tcgetattr 0)))
+     (tcsetattr 0 (tcsetattr-action TCSANOW) first)
+     (equal? first (tcgetattr 0))))
result: SKIP

test-name: terminal-window-size ENOTTY
location: /home/marusich/guix/tests/syscalls.scm:373
source:
+ (test-assert
+   "terminal-window-size ENOTTY"
+   (call-with-input-file
+     "/dev/null"
+     (lambda (port)
+       (catch 'system-error
+              (lambda () (terminal-window-size port))
+              (lambda args
+                (memv (system-error-errno args)
+                      (list ENOTTY EINVAL)))))))
actual-value: (25 22)
result: PASS

test-name: terminal-columns
location: /home/marusich/guix/tests/syscalls.scm:384
source:
+ (test-assert
+   "terminal-columns"
+   (> (terminal-columns) 0))
actual-value: #t
result: PASS

test-name: terminal-columns non-file port
location: /home/marusich/guix/tests/syscalls.scm:387
source:
+ (test-assert
+   "terminal-columns non-file port"
+   (> (terminal-columns
+        (open-input-string
+          "Join us now, share the software!"))
+      0))
actual-value: #t
result: PASS


SKIP: tests/gremlin
===================

test-name: elf-dynamic-info-needed, executable
location: /home/marusich/guix/tests/gremlin.scm:44
source:
+ (test-assert
+   "elf-dynamic-info-needed, executable"
+   (let* ((elf (call-with-input-file %guile-executable read-elf))
+          (dyninfo (elf-dynamic-info elf)))
+     (or (not dyninfo)
+         (lset<=
+           string=?
+           (list (string-append "libguile-" (effective-version))
+                 "libgc"
+                 "libunistring"
+                 "libffi")
+           (map (lambda (lib)
+                  (string-take lib (string-contains lib ".so")))
+                (elf-dynamic-info-needed dyninfo))))))
result: SKIP

test-name: expand-origin
location: /home/marusich/guix/tests/gremlin.scm:55
source:
+ (test-equal
+   "expand-origin"
+   '("OOO/../lib"
+     "OOO"
+     "../OOO/bar/OOO/baz"
+     "ORIGIN/foo")
+   (map (cut expand-origin <> "OOO")
+        '("$ORIGIN/../lib"
+          "${ORIGIN}"
+          "../${ORIGIN}/bar/$ORIGIN/baz"
+          "ORIGIN/foo")))
expected-value: (OOO/../lib OOO ../OOO/bar/OOO/baz ORIGIN/foo)
actual-value: (OOO/../lib OOO ../OOO/bar/OOO/baz ORIGIN/foo)
result: PASS


FAIL: tests/publish
===================

publishing /home/marusich/guix/test-tmp/store on 0.0.0.0, port 6789
test-name: /nix-cache-info
location: /home/marusich/guix/tests/publish.scm:86
source:
+ (test-equal
+   "/nix-cache-info"
+   (format
+     #f
+     "StoreDir: ~a\nWantMassQuery: 0\nPriority: 100\n"
+     %store-directory)
+   (http-get-body (publish-uri "/nix-cache-info")))
GET /nix-cache-info
expected-value: StoreDir: /home/marusich/guix/test-tmp/store
WantMassQuery: 0
Priority: 100

actual-value: StoreDir: /home/marusich/guix/test-tmp/store
WantMassQuery: 0
Priority: 100

result: PASS

test-name: /*.narinfo
location: /home/marusich/guix/tests/publish.scm:91
source:
+ (test-equal
+   "/*.narinfo"
+   (let* ((info (query-path-info %store %item))
+          (unsigned-info
+            (format
+              #f
+              "StorePath: ~a\nURL: nar/~a\nCompression: none\nNarHash: sha256:~a\nNarSize: ~d\nReferences: ~a~%"
+              %item
+              (basename %item)
+              (bytevector->nix-base32-string
+                (path-info-hash info))
+              (path-info-nar-size info)
+              (basename (first (path-info-references info)))))
+          (signature
+            (base64-encode
+              (string->utf8
+                (canonical-sexp->string
+                  ((@@ (guix scripts publish) signed-string)
+                   unsigned-info))))))
+     (format
+       #f
+       "~aSignature: 1;~a;~a~%"
+       unsigned-info
+       (gethostname)
+       signature))
+   (utf8->string
+     (http-get-body
+       (publish-uri
+         (string-append
+           "/"
+           (store-path-hash-part %item)
+           ".narinfo")))))
GET /z8qsg9bmmjzgfi0bbgls1wxd0wmhhm2i.narinfo
expected-value: StorePath: /home/marusich/guix/test-tmp/store/z8qsg9bmmjzgfi0bbgls1wxd0wmhhm2i-item
URL: nar/z8qsg9bmmjzgfi0bbgls1wxd0wmhhm2i-item
Compression: none
NarHash: sha256:1xngcmsdkdvaycaqjfzvq4gr3gib56p2l8illglnsqzhpss47pxz
NarSize: 120
References: y4iawzxx7xf5bq5fyj8frrzdrrrhdjsx-ref
Signature: 1;garuda;KHNpZ25hdHVyZSAKIChkYXRhIAogIChmbGFncyBwa2NzMSkKICAoaGFzaCBzaGEyNTYgI0UzQjYxQThGM0UyQzczNTA4NTAwRDI2OThDMjIzN0ZCMTc2NTUyQUIyMDEzNjczNjE3QTNCN0VFRUUwMEM4OTAjKQogICkKIChzaWctdmFsIAogIChyc2EgCiAgIChzICM1Qzc4MTEwODExOTVCREYyODlCRUNGMzIxNjE3OEZDMDZCOUI4Q0U0QzlGOUZCNzlDNDA4NDk1QjFFREJCRThCQjNCN0ZBODNDNUREN0E3OTFDRjQ1MEVDNkNGQUY5NDhBQjRGMjMzMUU4NjM1RjMwQzg1RDNBRkI1MEFCRTkwMDBDMzIyQjNCRUE1QUNCOEM0MTJBNzVBQjA1MEJCODg5Q0UwMTBDNDQ3Qjc0N0E3NDYzMDQyMEY4NDU1M0FBQTU3N0EwN0IwQzE5MjdDQ0VBQzgwMURCN0I5MkEwNjJEQzhEMjk1MDNDRTgyOUM2NzE3QjZCRTRFNDY3RUUxREM2IykKICAgKQogICkKIChwdWJsaWMta2V5IAogIChyc2EgCiAgIChuICMwMEMxRjc2NDA2OUY1NEZGRTkzQTEyNkIwMjMyODkwM0U5ODRFNEFFM0FGNkRGNDAyQjVCNkIzOTA3OTExQjg4QzM4NUYxQkE3NkEwMDJFQzlERUExMDlBNTIyOEVGMEU2MkVFMzFBMDZEMUE1ODYxQ0FCNDc0RjZDODU3QUM2NkVCNjVBMTkwNUYyNUJCQTE4Njk1NzlFNzNBM0I3RkVEMTNBRjVBMTY2NzMyNkY4OENERkMyRkYyNEIwM0MxNEZEMTM4NEFBN0U3M0NBODk1NzI4ODBCNjA2RTNBOTc0RTE1MzQ3OTYzRkM3QjYzNzg1NzQ5MzZBNDc1ODBEQkNCNDUjKQogICAoZSAjMDEwMDAxIykKICAgKQogICkKICkK

actual-value: StorePath: /home/marusich/guix/test-tmp/store/z8qsg9bmmjzgfi0bbgls1wxd0wmhhm2i-item
URL: nar/z8qsg9bmmjzgfi0bbgls1wxd0wmhhm2i-item
Compression: none
NarHash: sha256:1xngcmsdkdvaycaqjfzvq4gr3gib56p2l8illglnsqzhpss47pxz
NarSize: 120
References: y4iawzxx7xf5bq5fyj8frrzdrrrhdjsx-ref
Signature: 1;garuda;KHNpZ25hdHVyZSAKIChkYXRhIAogIChmbGFncyBwa2NzMSkKICAoaGFzaCBzaGEyNTYgI0UzQjYxQThGM0UyQzczNTA4NTAwRDI2OThDMjIzN0ZCMTc2NTUyQUIyMDEzNjczNjE3QTNCN0VFRUUwMEM4OTAjKQogICkKIChzaWctdmFsIAogIChyc2EgCiAgIChzICM1Qzc4MTEwODExOTVCREYyODlCRUNGMzIxNjE3OEZDMDZCOUI4Q0U0QzlGOUZCNzlDNDA4NDk1QjFFREJCRThCQjNCN0ZBODNDNUREN0E3OTFDRjQ1MEVDNkNGQUY5NDhBQjRGMjMzMUU4NjM1RjMwQzg1RDNBRkI1MEFCRTkwMDBDMzIyQjNCRUE1QUNCOEM0MTJBNzVBQjA1MEJCODg5Q0UwMTBDNDQ3Qjc0N0E3NDYzMDQyMEY4NDU1M0FBQTU3N0EwN0IwQzE5MjdDQ0VBQzgwMURCN0I5MkEwNjJEQzhEMjk1MDNDRTgyOUM2NzE3QjZCRTRFNDY3RUUxREM2IykKICAgKQogICkKIChwdWJsaWMta2V5IAogIChyc2EgCiAgIChuICMwMEMxRjc2NDA2OUY1NEZGRTkzQTEyNkIwMjMyODkwM0U5ODRFNEFFM0FGNkRGNDAyQjVCNkIzOTA3OTExQjg4QzM4NUYxQkE3NkEwMDJFQzlERUExMDlBNTIyOEVGMEU2MkVFMzFBMDZEMUE1ODYxQ0FCNDc0RjZDODU3QUM2NkVCNjVBMTkwNUYyNUJCQTE4Njk1NzlFNzNBM0I3RkVEMTNBRjVBMTY2NzMyNkY4OENERkMyRkYyNEIwM0MxNEZEMTM4NEFBN0U3M0NBODk1NzI4ODBCNjA2RTNBOTc0RTE1MzQ3OTYzRkM3QjYzNzg1NzQ5MzZBNDc1ODBEQkNCNDUjKQogICAoZSAjMDEwMDAxIykKICAgKQogICkKICkK

result: PASS

test-name: /*.narinfo with properly encoded '+' sign
location: /home/marusich/guix/tests/publish.scm:119
source:
+ (test-equal
+   "/*.narinfo with properly encoded '+' sign"
+   (let* ((item (add-text-to-store
+                  %store
+                  "fake-gtk+"
+                  "Congrats!"))
+          (info (query-path-info %store item))
+          (unsigned-info
+            (format
+              #f
+              "StorePath: ~a\nURL: nar/~a\nCompression: none\nNarHash: sha256:~a\nNarSize: ~d\nReferences: ~%"
+              item
+              (uri-encode (basename item))
+              (bytevector->nix-base32-string
+                (path-info-hash info))
+              (path-info-nar-size info)))
+          (signature
+            (base64-encode
+              (string->utf8
+                (canonical-sexp->string
+                  ((@@ (guix scripts publish) signed-string)
+                   unsigned-info))))))
+     (format
+       #f
+       "~aSignature: 1;~a;~a~%"
+       unsigned-info
+       (gethostname)
+       signature))
+   (let ((item (add-text-to-store
+                 %store
+                 "fake-gtk+"
+                 "Congrats!")))
+     (utf8->string
+       (http-get-body
+         (publish-uri
+           (string-append
+             "/"
+             (store-path-hash-part item)
+             ".narinfo"))))))
GET /4cvjsd4vzw8xrpmx3kxg4y69xzba1rkb.narinfo
expected-value: StorePath: /home/marusich/guix/test-tmp/store/4cvjsd4vzw8xrpmx3kxg4y69xzba1rkb-fake-gtk+
URL: nar/4cvjsd4vzw8xrpmx3kxg4y69xzba1rkb-fake-gtk%2B
Compression: none
NarHash: sha256:1ysbwi8icaw2g5qmwjf9k0qd4d9gazd91kf1djycpk5ahwh4kmlp
NarSize: 128
References: 
Signature: 1;garuda;KHNpZ25hdHVyZSAKIChkYXRhIAogIChmbGFncyBwa2NzMSkKICAoaGFzaCBzaGEyNTYgIzQ2OTU2OUEwRUJFRUZGMkRGNDVGNTFBODNBQTE2MjJEQTYyOTY1RTAzRENEMzhGMEM2NTM5Q0MzQzg1MkZBMDcjKQogICkKIChzaWctdmFsIAogIChyc2EgCiAgIChzICM2NUMyOTM1NDcxQ0QxMzZEQkNFNTFCMTQ0NUM4RDk3MkI3OEUzMTlGNDkwOTU5MUNDMjkxNTM0RjFGNzRCRDc1NTc4RTU4NzlGODkwRTYxRDRERTIwQzU1OEY1REU0Q0RFQzJFNDg5QjQ0QUE0OEQ2MUUwNDA3RjkxNEY0NTZGNzYyNUMzNTU0QjhCQTIyMURBMEU5NTZGOUI4OTk4NThCRkI2MzJFMThCMEU0RTg4RDMzQTQ3RTZFNUZEMEE2MjIwODUzMjY5REQwNTVEQjIwN0M3MDM4OTY1RUNFRTc0MzIxN0E0MTcyRTY2Q0M0ODI4MTk0NjBCRjY5RTRBOUM1IykKICAgKQogICkKIChwdWJsaWMta2V5IAogIChyc2EgCiAgIChuICMwMEMxRjc2NDA2OUY1NEZGRTkzQTEyNkIwMjMyODkwM0U5ODRFNEFFM0FGNkRGNDAyQjVCNkIzOTA3OTExQjg4QzM4NUYxQkE3NkEwMDJFQzlERUExMDlBNTIyOEVGMEU2MkVFMzFBMDZEMUE1ODYxQ0FCNDc0RjZDODU3QUM2NkVCNjVBMTkwNUYyNUJCQTE4Njk1NzlFNzNBM0I3RkVEMTNBRjVBMTY2NzMyNkY4OENERkMyRkYyNEIwM0MxNEZEMTM4NEFBN0U3M0NBODk1NzI4ODBCNjA2RTNBOTc0RTE1MzQ3OTYzRkM3QjYzNzg1NzQ5MzZBNDc1ODBEQkNCNDUjKQogICAoZSAjMDEwMDAxIykKICAgKQogICkKICkK

actual-value: StorePath: /home/marusich/guix/test-tmp/store/4cvjsd4vzw8xrpmx3kxg4y69xzba1rkb-fake-gtk+
URL: nar/4cvjsd4vzw8xrpmx3kxg4y69xzba1rkb-fake-gtk%2B
Compression: none
NarHash: sha256:1ysbwi8icaw2g5qmwjf9k0qd4d9gazd91kf1djycpk5ahwh4kmlp
NarSize: 128
References: 
Signature: 1;garuda;KHNpZ25hdHVyZSAKIChkYXRhIAogIChmbGFncyBwa2NzMSkKICAoaGFzaCBzaGEyNTYgIzQ2OTU2OUEwRUJFRUZGMkRGNDVGNTFBODNBQTE2MjJEQTYyOTY1RTAzRENEMzhGMEM2NTM5Q0MzQzg1MkZBMDcjKQogICkKIChzaWctdmFsIAogIChyc2EgCiAgIChzICM2NUMyOTM1NDcxQ0QxMzZEQkNFNTFCMTQ0NUM4RDk3MkI3OEUzMTlGNDkwOTU5MUNDMjkxNTM0RjFGNzRCRDc1NTc4RTU4NzlGODkwRTYxRDRERTIwQzU1OEY1REU0Q0RFQzJFNDg5QjQ0QUE0OEQ2MUUwNDA3RjkxNEY0NTZGNzYyNUMzNTU0QjhCQTIyMURBMEU5NTZGOUI4OTk4NThCRkI2MzJFMThCMEU0RTg4RDMzQTQ3RTZFNUZEMEE2MjIwODUzMjY5REQwNTVEQjIwN0M3MDM4OTY1RUNFRTc0MzIxN0E0MTcyRTY2Q0M0ODI4MTk0NjBCRjY5RTRBOUM1IykKICAgKQogICkKIChwdWJsaWMta2V5IAogIChyc2EgCiAgIChuICMwMEMxRjc2NDA2OUY1NEZGRTkzQTEyNkIwMjMyODkwM0U5ODRFNEFFM0FGNkRGNDAyQjVCNkIzOTA3OTExQjg4QzM4NUYxQkE3NkEwMDJFQzlERUExMDlBNTIyOEVGMEU2MkVFMzFBMDZEMUE1ODYxQ0FCNDc0RjZDODU3QUM2NkVCNjVBMTkwNUYyNUJCQTE4Njk1NzlFNzNBM0I3RkVEMTNBRjVBMTY2NzMyNkY4OENERkMyRkYyNEIwM0MxNEZEMTM4NEFBN0U3M0NBODk1NzI4ODBCNjA2RTNBOTc0RTE1MzQ3OTYzRkM3QjYzNzg1NzQ5MzZBNDc1ODBEQkNCNDUjKQogICAoZSAjMDEwMDAxIykKICAgKQogICkKICkK

result: PASS

test-name: /nar/*
location: /home/marusich/guix/tests/publish.scm:150
source:
+ (test-equal
+   "/nar/*"
+   "bar"
+   (call-with-temporary-output-file
+     (lambda (temp port)
+       (let ((nar (utf8->string
+                    (http-get-body
+                      (publish-uri
+                        (string-append "/nar/" (basename %item)))))))
+         (call-with-input-string
+           nar
+           (cut restore-file <> temp)))
+       (call-with-input-file temp read-string))))
GET /nar/z8qsg9bmmjzgfi0bbgls1wxd0wmhhm2i-item
expected-value: bar
actual-value: bar
result: PASS

test-name: /nar/gzip/*
location: /home/marusich/guix/tests/publish.scm:163
source:
+ (test-equal
+   "/nar/gzip/*"
+   "bar"
+   (call-with-temporary-output-file
+     (lambda (temp port)
+       (let ((nar (http-get-port
+                    (publish-uri
+                      (string-append "/nar/gzip/" (basename %item))))))
+         (call-with-gzip-input-port
+           nar
+           (cut restore-file <> temp)))
+       (call-with-input-file temp read-string))))
GET /nar/gzip/z8qsg9bmmjzgfi0bbgls1wxd0wmhhm2i-item
expected-value: bar
actual-value: #f
actual-error:
+ (srfi-34
+   #<condition &nar-error [file: "/tmp/guix-file.7fzEA2" port: #<closed: r6rs-custom-binary-input-port 0>] 27616f0>)
result: FAIL

test-name: /*.narinfo with compression
location: /home/marusich/guix/tests/publish.scm:176
source:
+ (test-equal
+   "/*.narinfo with compression"
+   `(("StorePath" unquote %item)
+     ("URL"
+      unquote
+      (string-append "nar/gzip/" (basename %item)))
+     ("Compression" . "gzip"))
+   (let ((thread
+           (call-with-new-thread
+             (lambda () (guix-publish "--port=6799" "-C5")))))
+     (wait-until-ready 6799)
+     (let* ((url (string-append
+                   "http://localhost:6799/"
+                   (store-path-hash-part %item)
+                   ".narinfo"))
+            (body (http-get-port url)))
+       (filter
+         (lambda (item)
+           (match item
+                  (("Compression" . _) #t)
+                  (("StorePath" . _) #t)
+                  (("URL" . _) #t)
+                  (_ #f)))
+         (recutils->alist body)))))
publishing /home/marusich/guix/test-tmp/store on 0.0.0.0, port 6799
GET /z8qsg9bmmjzgfi0bbgls1wxd0wmhhm2i.narinfo
expected-value: ((StorePath . /home/marusich/guix/test-tmp/store/z8qsg9bmmjzgfi0bbgls1wxd0wmhhm2i-item) (URL . nar/gzip/z8qsg9bmmjzgfi0bbgls1wxd0wmhhm2i-item) (Compression . gzip))
actual-value: ((StorePath . /home/marusich/guix/test-tmp/store/z8qsg9bmmjzgfi0bbgls1wxd0wmhhm2i-item) (URL . nar/gzip/z8qsg9bmmjzgfi0bbgls1wxd0wmhhm2i-item) (Compression . gzip))
result: PASS

test-name: /nar/ with properly encoded '+' sign
location: /home/marusich/guix/tests/publish.scm:195
source:
+ (test-equal
+   "/nar/ with properly encoded '+' sign"
+   "Congrats!"
+   (let ((item (add-text-to-store
+                 %store
+                 "fake-gtk+"
+                 "Congrats!")))
+     (call-with-temporary-output-file
+       (lambda (temp port)
+         (let ((nar (utf8->string
+                      (http-get-body
+                        (publish-uri
+                          (string-append
+                            "/nar/"
+                            (uri-encode (basename item))))))))
+           (call-with-input-string
+             nar
+             (cut restore-file <> temp)))
+         (call-with-input-file temp read-string)))))
GET /nar/4cvjsd4vzw8xrpmx3kxg4y69xzba1rkb-fake-gtk%2B
expected-value: Congrats!
actual-value: Congrats!
result: PASS

test-name: /nar/invalid
location: /home/marusich/guix/tests/publish.scm:207
source:
+ (test-equal
+   "/nar/invalid"
+   404
+   (begin
+     (call-with-output-file
+       (string-append (%store-prefix) "/invalid")
+       (lambda (port)
+         (display
+           "This file is not a valid store item."
+           port)))
+     (response-code
+       (http-get
+         (publish-uri (string-append "/nar/invalid"))))))
GET /nar/invalid
expected-value: 404
actual-value: 404
result: PASS

test-name: /file/NAME/sha256/HASH
location: /home/marusich/guix/tests/publish.scm:215
source:
+ (test-equal
+   "/file/NAME/sha256/HASH"
+   "Hello, Guix world!"
+   (let* ((data "Hello, Guix world!")
+          (hash (call-with-input-string data port-sha256))
+          (drv (run-with-store
+                 %store
+                 (gexp->derivation
+                   "the-file.txt"
+                   (gexp (call-with-output-file
+                           (ungexp output)
+                           (lambda (port) (display (ungexp data) port))))
+                   #:hash-algo
+                   'sha256
+                   #:hash
+                   hash)))
+          (out (build-derivations %store (list drv))))
+     (utf8->string
+       (http-get-body
+         (publish-uri
+           (string-append
+             "/file/the-file.txt/sha256/"
+             (bytevector->nix-base32-string hash)))))))
GET /file/the-file.txt/sha256/0halvvmzqz6wvp0g8sa9hda5g04j4hpnc5gd314npgarmbc2iw5f
expected-value: Hello, Guix world!
actual-value: Hello, Guix world!
result: PASS

test-name: /file/NAME/sha256/INVALID-NIX-BASE32-STRING
location: /home/marusich/guix/tests/publish.scm:233
source:
+ (test-equal
+   "/file/NAME/sha256/INVALID-NIX-BASE32-STRING"
+   404
+   (let ((uri (publish-uri
+                "/file/the-file.txt/sha256/not-a-nix-base32-string")))
+     (response-code (http-get uri))))
GET /file/the-file.txt/sha256/not-a-nix-base32-string
expected-value: 404
actual-value: 404
result: PASS

test-name: /file/NAME/sha256/INVALID-HASH
location: /home/marusich/guix/tests/publish.scm:239
source:
+ (test-equal
+   "/file/NAME/sha256/INVALID-HASH"
+   404
+   (let ((uri (publish-uri
+                (string-append
+                  "/file/the-file.txt/sha256/"
+                  (bytevector->nix-base32-string
+                    (call-with-input-string "" port-sha256))))))
+     (response-code (http-get uri))))
GET /file/the-file.txt/sha256/0mdqa9w1p6cmli6976v4wi0sw9r4p5prkj7lzfd1877wk11c9c73
expected-value: 404
actual-value: 404
result: PASS

random seed for tests: 1469189701

SKIP: tests/pypi
================

test-name: pypi->guix-package
location: /home/marusich/guix/tests/pypi.scm:76
source:
+ (test-assert
+   "pypi->guix-package"
+   (mock ((guix import utils)
+          url-fetch
+          (lambda (url file-name)
+            (match url
+                   ("https://pypi.python.org/pypi/foo/json"
+                    (with-output-to-file
+                      file-name
+                      (lambda () (display test-json))))
+                   ("https://example.com/foo-1.0.0.tar.gz"
+                    (begin
+                      (mkdir "foo-1.0.0")
+                      (with-output-to-file
+                        "foo-1.0.0/requirements.txt"
+                        (lambda () (display test-requirements)))
+                      (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)))))
+         (match (pypi->guix-package "foo")
+                (('package
+                  ('name "python-foo")
+                  ('version "1.0.0")
+                  ('source
+                   ('origin
+                    ('method 'url-fetch)
+                    ('uri
+                     (string-append
+                       "https://example.com/foo-"
+                       version
+                       ".tar.gz"))
+                    ('sha256 ('base32 (? string? hash)))))
+                  ('build-system 'python-build-system)
+                  ('inputs
+                   ('quasiquote
+                    (("python-bar" ('unquote 'python-bar))
+                     ("python-baz" ('unquote 'python-baz))
+                     ("python-setuptools"
+                      ('unquote 'python-setuptools)))))
+                  ('home-page "http://example.com")
+                  ('synopsis "summary")
+                  ('description "summary")
+                  ('license 'lgpl2.0))
+                 (string=?
+                   (bytevector->nix-base32-string test-source-hash)
+                   hash))
+                (x (pk 'fail x #f)))))
foo-1.0.0/
foo-1.0.0/requirements.txt
actual-value: #t
result: PASS

test-name: pypi->guix-package, wheels
location: /home/marusich/guix/tests/pypi.scm:125
source:
+ (test-assert
+   "pypi->guix-package, wheels"
+   (mock ((guix import utils)
+          url-fetch
+          (lambda (url file-name)
+            (match url
+                   ("https://pypi.python.org/pypi/foo/json"
+                    (with-output-to-file
+                      file-name
+                      (lambda () (display test-json))))
+                   ("https://example.com/foo-1.0.0.tar.gz"
+                    (begin
+                      (mkdir "foo-1.0.0")
+                      (with-output-to-file
+                        "foo-1.0.0/requirements.txt"
+                        (lambda () (display test-requirements)))
+                      (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.json"
+                        (lambda () (display test-metadata)))
+                      (let ((zip-file (string-append file-name ".zip")))
+                        (system*
+                          "zip"
+                          zip-file
+                          "foo-1.0.0.dist-info/metadata.json")
+                        (rename-file zip-file file-name))
+                      (delete-file-recursively "foo-1.0.0.dist-info")))
+                   (_ (error "Unexpected URL: " url)))))
+         (match (pypi->guix-package "foo")
+                (('package
+                  ('name "python-foo")
+                  ('version "1.0.0")
+                  ('source
+                   ('origin
+                    ('method 'url-fetch)
+                    ('uri
+                     (string-append
+                       "https://example.com/foo-"
+                       version
+                       ".tar.gz"))
+                    ('sha256 ('base32 (? string? hash)))))
+                  ('build-system 'python-build-system)
+                  ('inputs
+                   ('quasiquote
+                    (("python-bar" ('unquote 'python-bar))
+                     ("python-baz" ('unquote 'python-baz))
+                     ("python-setuptools"
+                      ('unquote 'python-setuptools)))))
+                  ('home-page "http://example.com")
+                  ('synopsis "summary")
+                  ('description "summary")
+                  ('license 'lgpl2.0))
+                 (string=?
+                   (bytevector->nix-base32-string test-source-hash)
+                   hash))
+                (x (pk 'fail x #f)))))
result: SKIP

random seed for tests: 1469189932


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-08-02 16:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-24  9:31 bug#24060: Test failure: tests/publish.scm Chris Marusich
2016-07-24 23:01 ` Chris Marusich
2016-07-26 21:08 ` Ludovic Courtès
2016-07-27 10:49 ` Ludovic Courtès
2016-07-28 16:07 ` bug#24060: Test (tests/publish.scm) still fails after fix Chris Marusich
2016-07-28 21:20   ` Ludovic Courtès
2016-07-30  7:59     ` Chris Marusich
2016-07-30  9:16       ` Ludovic Courtès
2016-08-02 16:10       ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.