[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/02: gnu: fabric: Enable tests.
From: |
Marius Bakke |
Subject: |
02/02: gnu: fabric: Enable tests. |
Date: |
Tue, 18 Apr 2017 13:34:18 -0400 (EDT) |
mbakke pushed a commit to branch master
in repository guix.
commit 1b5b24c92d5176083ad749ba5d28f6ac31a3a0f7
Author: Ben Sturmfels <address@hidden>
Date: Wed Apr 19 02:24:57 2017 +1000
gnu: fabric: Enable tests.
* gnu/packages/patches/fabric-tests.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/admin.scm (fabric)[source]: Use it.
[native-inputs]: Add PYTHON2-FUDGE, PYTHON2-JINJA2 and PYTHON2-NOSE.
[arguments]<#:tests>: Remove.
Signed-off-by: Marius Bakke <address@hidden>
---
gnu/local.mk | 1 +
gnu/packages/admin.scm | 18 +++++++++++-------
gnu/packages/patches/fabric-tests.patch | 15 +++++++++++++++
3 files changed, 27 insertions(+), 7 deletions(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index 5822add..c719f04 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -552,6 +552,7 @@ dist_patch_DATA =
\
%D%/packages/patches/eudev-conflicting-declaration.patch \
%D%/packages/patches/evilwm-lost-focus-bug.patch \
%D%/packages/patches/expat-CVE-2016-0718-fix-regression.patch \
+ %D%/packages/patches/fabric-tests.patch \
%D%/packages/patches/fastcap-mulGlobal.patch \
%D%/packages/patches/fastcap-mulSetup.patch \
%D%/packages/patches/fasthenry-spAllocate.patch \
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 4daaddc..8f4a4cd 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -12,10 +12,10 @@
;;; Copyright © 2016, 2017 Efraim Flashner <address@hidden>
;;; Copyright © 2016 Peter Feigl <address@hidden>
;;; Copyright © 2016 John J. Foerch <address@hidden>
-;;; Coypright © 2016, 2017 ng0 <address@hidden>
-;;; Coypright © 2016 Tobias Geerinckx-Rice <address@hidden>
-;;; Coypright © 2016 John Darrington <address@hidden>
-;;; Coypright © 2017 Ben Sturmfels <address@hidden>
+;;; Copyright © 2016, 2017 ng0 <address@hidden>
+;;; Copyright © 2016 Tobias Geerinckx-Rice <address@hidden>
+;;; Copyright © 2016 John Darrington <address@hidden>
+;;; Copyright © 2017 Ben Sturmfels <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2060,11 +2060,15 @@ Intel DRM Driver.")
(uri (pypi-uri "Fabric" version))
(sha256
(base32
- "1z17hw0yiqp1blq217zxkg2jzkv8qd79saqhscgsw14mwlcqpwd0"))))
+ "1z17hw0yiqp1blq217zxkg2jzkv8qd79saqhscgsw14mwlcqpwd0"))
+ (patches (search-patches "fabric-tests.patch"))))
(build-system python-build-system)
(arguments
- `(#:tests? #f ;XXX: Tests attempt to download Python "fudge" package.
- #:python ,python-2)) ;Python 2 only
+ `(#:python ,python-2)) ;Python 2 only
+ (native-inputs
+ `(("python2-fudge" ,python2-fudge) ; Requires < 1.0
+ ("python2-jinja2" ,python2-jinja2) ; Requires < 3.0
+ ("python2-nose" ,python2-nose))) ; Requires < 2.0
(propagated-inputs
;; Required upgrading python-paramiko 1.17.4 to fix an incompatibility
;; between python-paramiko and newer python-pycrypto. Without this, the
diff --git a/gnu/packages/patches/fabric-tests.patch
b/gnu/packages/patches/fabric-tests.patch
new file mode 100644
index 0000000..4a0ca9f
--- /dev/null
+++ b/gnu/packages/patches/fabric-tests.patch
@@ -0,0 +1,15 @@
+The `fab` excecutable doesn't exist during the test phase as it is created
+dynamically during installation. Refer to the equivalent Python module
+directly.
+
+--- a/tests/test_utils.py
++++ b/tests/test_utils.py
+@@ -93,7 +93,7 @@
+ # perform when they are allowed to bubble all the way to the top. So, we
+ # invoke a subprocess and look at its stderr instead.
+ with quiet():
+- result = local("fab -f tests/support/aborts.py kaboom", capture=True)
++ result = local("python -m fabric -f tests/support/aborts.py kaboom",
capture=True)
+ # When error in #1318 is present, this has an extra "It burns!" at end of
+ # stderr string.
+ eq_(result.stderr, "Fatal error: It burns!\n\nAborting.")
\ No newline at end of file