GNU bug report logs - #26140
Tests for obnam

Previous Next

Package: guix-patches;

Reported by: Arun Isaac <arunisaac <at> systemreboot.net>

Date: Fri, 17 Mar 2017 13:50:01 UTC

Severity: normal

Done: Marius Bakke <mbakke <at> fastmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: 26140 <at> debbugs.gnu.org
Cc: Arun Isaac <arunisaac <at> systemreboot.net>
Subject: bug#26140: [PATCH 7/7] gnu: obnam: Enable tests.
Date: Sat, 18 Mar 2017 02:44:30 +0530
* gnu/packages/backup.scm (obnam)[arguments]: Replace 'check' phase with
  custom function.
---
 gnu/packages/backup.scm | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index 97ab70e65..7e9ae18f3 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -644,7 +644,23 @@ NTFS volumes using @code{ntfs-3g}, preserving NTFS-specific attributes.")
          "0qlipsq50hca71zc0dp1mg9zs12qm0sbblw7qfzl0hj6mk2rv1by"))))
     (build-system python-build-system)
     (arguments
-     `(#:python ,python-2))
+     `(#:python ,python-2
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'check
+                  (lambda _
+                    (substitute* "obnamlib/vfs_local_tests.py"
+                      ;; Check for the nobody user instead of root
+                      (("self.fs.get_username\\(0\\), 'root'")
+                       "self.fs.get_username(65534), 'nobody'")
+                      ;; Disable tests checking for root group
+                      (("self.fs.get_groupname\\(0\\)") "'root'"))
+                    (substitute* "obnamlib/vfs_local.py"
+                      ;; Don't cover get_groupname function
+                      (("def get_groupname\\(self, gid\\):")
+                       "def get_groupname(self, gid):  # pragma: no cover"))
+                    ;; Can't run network tests
+                    (zero? (system* "./check" "--unit-tests")))))))
     (inputs
      `(("python2-cliapp" ,python2-cliapp)
        ("python2-larch" ,python2-larch)
@@ -652,6 +668,12 @@ NTFS volumes using @code{ntfs-3g}, preserving NTFS-specific attributes.")
        ("python2-pyaml" ,python2-pyaml)
        ("python2-tracing" ,python2-tracing)
        ("python2-ttystatus" ,python2-ttystatus)))
+    (native-inputs
+     `(("gnupg" ,gnupg)
+       ("python2-coverage" ,python2-coverage)
+       ("python2-coverage-test-runner" ,python2-coverage-test-runner)
+       ("python2-pep8" ,python2-pep8)
+       ("python2-pylint" ,python2-pylint)))
     (home-page "https://obnam.org/")
     (synopsis "Easy and secure backup program")
     (description "Obnam is an easy, secure backup program.  Features
-- 
2.11.0





This bug report was last modified 8 years and 125 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.