Skip to content
Snippets Groups Projects
Commit 335bc683 authored by Eric Bavier's avatar Eric Bavier
Browse files

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.
parent 182d6311
No related branches found
No related tags found
No related merge requests found
...@@ -321,6 +321,8 @@ dist_patch_DATA = \ ...@@ -321,6 +321,8 @@ dist_patch_DATA = \
gnu/packages/patches/diffutils-gets-undeclared.patch \ gnu/packages/patches/diffutils-gets-undeclared.patch \
gnu/packages/patches/doxygen-test.patch \ gnu/packages/patches/doxygen-test.patch \
gnu/packages/patches/doxygen-tmake.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/emacs-configure-sh.patch \
gnu/packages/patches/eudev-rules-directory.patch \ gnu/packages/patches/eudev-rules-directory.patch \
gnu/packages/patches/file-CVE-2014-3587.patch \ gnu/packages/patches/file-CVE-2014-3587.patch \
......
...@@ -29,6 +29,7 @@ (define-module (gnu packages backup) ...@@ -29,6 +29,7 @@ (define-module (gnu packages backup)
#:use-module (gnu packages dejagnu) #:use-module (gnu packages dejagnu)
#:use-module (gnu packages glib) #:use-module (gnu packages glib)
#:use-module (gnu packages gnupg) #:use-module (gnu packages gnupg)
#:use-module (gnu packages linux)
#:use-module (gnu packages mcrypt) #:use-module (gnu packages mcrypt)
#:use-module (gnu packages nettle) #:use-module (gnu packages nettle)
#:use-module (gnu packages pcre) #:use-module (gnu packages pcre)
...@@ -53,7 +54,9 @@ (define-public duplicity ...@@ -53,7 +54,9 @@ (define-public duplicity
version ".tar.gz")) version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"0l14nrhbgkyjgvh339bbhnm6hrdwrjadphq1jmpi0mcgcdbdfh8x")))) "0l14nrhbgkyjgvh339bbhnm6hrdwrjadphq1jmpi0mcgcdbdfh8x"))
(patches (list (search-patch "duplicity-piped-password.patch")
(search-patch "duplicity-test_selection-tmp.patch")))))
(build-system python-build-system) (build-system python-build-system)
(native-inputs (native-inputs
`(("python2-setuptools" ,python2-setuptools) `(("python2-setuptools" ,python2-setuptools)
...@@ -63,15 +66,21 @@ (define-public duplicity ...@@ -63,15 +66,21 @@ (define-public duplicity
("librsync" ,librsync) ("librsync" ,librsync)
("mock" ,python2-mock) ;for testing ("mock" ,python2-mock) ;for testing
("lockfile" ,python2-lockfile) ("lockfile" ,python2-lockfile)
("gnupg" ,gnupg-1))) ;gpg executable needed ("gnupg" ,gnupg-1) ;gpg executable needed
("util-linux" ,util-linux) ;for setsid
("tzdata" ,tzdata)))
(arguments (arguments
`(#:python ,python-2 ;setup assumes Python 2 `(#:python ,python-2 ;setup assumes Python 2
#:test-target "test" #:test-target "test"
#:phases (alist-cons-before #:phases (alist-cons-before
'check 'patch-tests 'check 'check-setup
(lambda _ (lambda* (#:key inputs #:allow-other-keys)
(substitute* "testing/functional/__init__.py" (substitute* "testing/functional/__init__.py"
(("/bin/sh") (which "sh")))) (("/bin/sh") (which "sh")))
(setenv "HOME" (getcwd)) ;gpg needs to write to $HOME
(setenv "TZDIR" ;some timestamp checks need TZDIR
(string-append (assoc-ref inputs "tzdata")
"/share/zoneinfo")))
%standard-phases))) %standard-phases)))
(home-page "http://duplicity.nongnu.org/index.html") (home-page "http://duplicity.nongnu.org/index.html")
(synopsis "Encrypted backup using rsync algorithm") (synopsis "Encrypted backup using rsync algorithm")
......
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):
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()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment