unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: duplicity: Fix and disable some tests.
@ 2014-09-28 20:38 Eric Bavier
  2014-09-28 22:22 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Bavier @ 2014-09-28 20:38 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 62 bytes --]

This patch should fix the failing duplicity builds on hydra.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-duplicity-Fix-and-disable-some-tests.patch --]
[-- Type: text/x-diff, Size: 6038 bytes --]

From 91ea5ded0548acb9945acd9ad110c266c79ad81b Mon Sep 17 00:00:00 2001
From: Eric Bavier <bavier@member.fsf.org>
Date: Sun, 28 Sep 2014 15:04:34 -0500
Subject: [PATCH] gnu: duplicity: Fix and disable some tests.

* gnu/packages/patches/duplicity-piped-password.patch: New patch.
* gnu/packages/patches/duplicity-test_selection-tmp.patch: New patch.
* gnu-system.am (dist_patch_DATA): Add them.
* gnu/packages/backup.scm (duplicity)[source]: Add patches field.  [inputs]:
  Add util-linux and tzdata.  [arguments]: rename patch-tests phase to
  check-setup.  Set HOME and TZDIR for tests.
---
 gnu-system.am                                      |    2 ++
 gnu/packages/backup.scm                            |   19 ++++++++++++++-----
 .../patches/duplicity-piped-password.patch         |   20 ++++++++++++++++++++
 .../patches/duplicity-test_selection-tmp.patch     |   18 ++++++++++++++++++
 4 files changed, 54 insertions(+), 5 deletions(-)
 create mode 100644 gnu/packages/patches/duplicity-piped-password.patch
 create mode 100644 gnu/packages/patches/duplicity-test_selection-tmp.patch

diff --git a/gnu-system.am b/gnu-system.am
index 126f4e3..bb944fb 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -321,6 +321,8 @@ dist_patch_DATA =						\
   gnu/packages/patches/diffutils-gets-undeclared.patch		\
   gnu/packages/patches/doxygen-test.patch			\
   gnu/packages/patches/doxygen-tmake.patch			\
+  gnu/packages/patches/duplicity-piped-password.patch		\
+  gnu/packages/patches/duplicity-test_selection-tmp.patch	\
   gnu/packages/patches/emacs-configure-sh.patch			\
   gnu/packages/patches/eudev-rules-directory.patch		\
   gnu/packages/patches/file-CVE-2014-3587.patch			\
diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index 6fd7306..7fdbab3 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -29,6 +29,7 @@
   #:use-module (gnu packages dejagnu)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnupg)
+  #:use-module (gnu packages linux)
   #:use-module (gnu packages mcrypt)
   #:use-module (gnu packages nettle)
   #:use-module (gnu packages pcre)
@@ -53,7 +54,9 @@
                           version ".tar.gz"))
       (sha256
        (base32
-        "0l14nrhbgkyjgvh339bbhnm6hrdwrjadphq1jmpi0mcgcdbdfh8x"))))
+        "0l14nrhbgkyjgvh339bbhnm6hrdwrjadphq1jmpi0mcgcdbdfh8x"))
+      (patches (list (search-patch "duplicity-piped-password.patch")
+                     (search-patch "duplicity-test_selection-tmp.patch")))))
     (build-system python-build-system)
     (native-inputs
      `(("python2-setuptools" ,python2-setuptools)
@@ -63,15 +66,21 @@
        ("librsync" ,librsync)
        ("mock" ,python2-mock)           ;for testing
        ("lockfile" ,python2-lockfile)
-       ("gnupg" ,gnupg-1)))             ;gpg executable needed
+       ("gnupg" ,gnupg-1)               ;gpg executable needed
+       ("util-linux" ,util-linux)       ;for setsid
+       ("tzdata" ,tzdata)))
     (arguments
      `(#:python ,python-2               ;setup assumes Python 2
        #:test-target "test"
        #:phases (alist-cons-before
-                 'check 'patch-tests
-                 (lambda _
+                 'check 'check-setup
+                 (lambda* (#:key inputs #:allow-other-keys)
                    (substitute* "testing/functional/__init__.py"
-                     (("/bin/sh") (which "sh"))))
+                     (("/bin/sh") (which "sh")))
+                   (setenv "HOME" (getcwd)) ;gpg needs to write to $HOME
+                   (setenv "TZDIR"
+                           (string-append (assoc-ref inputs "tzdata")
+                                          "/share/zoneinfo")))
                  %standard-phases)))
     (home-page "http://duplicity.nongnu.org/index.html")
     (synopsis "Encrypted backup using rsync algorithm")
diff --git a/gnu/packages/patches/duplicity-piped-password.patch b/gnu/packages/patches/duplicity-piped-password.patch
new file mode 100644
index 0000000..db50f5d
--- /dev/null
+++ b/gnu/packages/patches/duplicity-piped-password.patch
@@ -0,0 +1,20 @@
+This test, on three occasions, is failing with the error:
+
+  EOF: End Of File (EOF) in read_nonblocking(). Braindead platform.
+
+--- duplicity-0.6.24/testing/functional/test_final.py	2014-09-28 13:14:52.146001614 -0500
++++ duplicity-0.6.24/testing/functional/test_final.py	2014-09-28 13:13:20.333546342 -0500
+@@ -156,13 +156,6 @@
+         self.run_duplicity(options=["remove-older-than", "50000", "--force", self.backend_url])
+         self.assertEqual(self.get_backend_files(), second_chain)
+ 
+-    def test_piped_password(self):
+-        """Make sure that prompting for a password works"""
+-        self.set_environ("PASSPHRASE", None)
+-        self.backup("full", "testfiles/empty_dir",
+-                    passphrase_input=[self.sign_passphrase, self.sign_passphrase])
+-        self.restore(passphrase_input=[self.sign_passphrase])
+-
+ 
+ class OldFilenamesFinalTest(FinalTest):
+ 
diff --git a/gnu/packages/patches/duplicity-test_selection-tmp.patch b/gnu/packages/patches/duplicity-test_selection-tmp.patch
new file mode 100644
index 0000000..8f66be4
--- /dev/null
+++ b/gnu/packages/patches/duplicity-test_selection-tmp.patch
@@ -0,0 +1,18 @@
+Reported upstream at https://bugs.launchpad.net/duplicity/+bug/1375019
+
+--- duplicity-0.6.24/testing/unit/test_selection.py	2014-05-09 08:27:40.000000000 -0500
++++ duplicity-0.6.24/testing/unit/test_selection.py	2014-09-28 12:28:53.932324380 -0500
+@@ -431,10 +431,10 @@
+                        [(), ('1',), ('1', '1'), ('1', '2'), ('1', '3')])
+ 
+         self.root = Path("/")
+-        self.ParseTest([("--exclude", "/home/*"),
+-                        ("--include", "/home"),
++        self.ParseTest([("--exclude", "/tmp/*"),
++                        ("--include", "/tmp"),
+                         ("--exclude", "/")],
+-                       [(), ("home",)])
++                       [(), ("tmp",)])
+ 
+ if __name__ == "__main__":
+     unittest.main()
-- 
1.7.10.4


[-- Attachment #3: Type: text/plain, Size: 17 bytes --]


-- 
Eric Bavier

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

* Re: [PATCH] gnu: duplicity: Fix and disable some tests.
  2014-09-28 20:38 [PATCH] gnu: duplicity: Fix and disable some tests Eric Bavier
@ 2014-09-28 22:22 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2014-09-28 22:22 UTC (permalink / raw)
  To: Eric Bavier; +Cc: guix-devel

Eric Bavier <ericbavier@gmail.com> skribis:

> From 91ea5ded0548acb9945acd9ad110c266c79ad81b Mon Sep 17 00:00:00 2001
> From: Eric Bavier <bavier@member.fsf.org>
> Date: Sun, 28 Sep 2014 15:04:34 -0500
> Subject: [PATCH] gnu: duplicity: Fix and disable some tests.
>
> * gnu/packages/patches/duplicity-piped-password.patch: New patch.
> * gnu/packages/patches/duplicity-test_selection-tmp.patch: New patch.
> * gnu-system.am (dist_patch_DATA): Add them.
> * gnu/packages/backup.scm (duplicity)[source]: Add patches field.  [inputs]:
>   Add util-linux and tzdata.  [arguments]: rename patch-tests phase to
>   check-setup.  Set HOME and TZDIR for tests.

Each [field] should start on a new line.

> +                 (lambda* (#:key inputs #:allow-other-keys)
>                     (substitute* "testing/functional/__init__.py"
> -                     (("/bin/sh") (which "sh"))))
> +                     (("/bin/sh") (which "sh")))
> +                   (setenv "HOME" (getcwd)) ;gpg needs to write to $HOME
> +                   (setenv "TZDIR"
> +                           (string-append (assoc-ref inputs "tzdata")
> +                                          "/share/zoneinfo")))

Could you add a comment saying what needs TZDIR?

> +++ b/gnu/packages/patches/duplicity-piped-password.patch
> @@ -0,0 +1,20 @@
> +This test, on three occasions, is failing with the error:
> +
> +  EOF: End Of File (EOF) in read_nonblocking(). Braindead platform.

:-)

OK to commit with these changes.

Thank you!

Ludo’.

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

end of thread, other threads:[~2014-09-28 22:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-28 20:38 [PATCH] gnu: duplicity: Fix and disable some tests Eric Bavier
2014-09-28 22:22 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).