summaryrefslogtreecommitdiff
path: root/gnu/packages/lsof.scm
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2018-02-19 02:07:36 +0100
committerTobias Geerinckx-Rice <me@tobias.gr>2018-02-19 06:00:30 +0100
commit16cb3b8fe00500fc5d434cd761afbfb594cfd4c4 (patch)
treec2cfdd6ae1500d63d3f36db878393ea1bed371a2 /gnu/packages/lsof.scm
parentc2799070caf305a4c88e9a77fc36632069811f56 (diff)
downloadguix-patches-16cb3b8fe00500fc5d434cd761afbfb594cfd4c4.tar
guix-patches-16cb3b8fe00500fc5d434cd761afbfb594cfd4c4.tar.gz
gnu: lsof: Run tests.
* gnu/packages/lsof.scm (lsof)[arguments]: Remove untrue #:TESTS?. Add ‘disable-failing-tests’ and ‘check’ phases to run them.
Diffstat (limited to 'gnu/packages/lsof.scm')
-rw-r--r--gnu/packages/lsof.scm20
1 files changed, 18 insertions, 2 deletions
diff --git a/gnu/packages/lsof.scm b/gnu/packages/lsof.scm
index 7f365f32c1..098242dc7a 100644
--- a/gnu/packages/lsof.scm
+++ b/gnu/packages/lsof.scm
@@ -57,8 +57,7 @@
(build-system gnu-build-system)
(native-inputs `(("perl" ,perl)))
(arguments
- `(#:tests? #f ; no test target
- #:phases
+ `(#:phases
(modify-phases %standard-phases
(replace 'unpack
(lambda* (#:key source #:allow-other-keys)
@@ -75,6 +74,23 @@
(lambda _
(substitute* "Makefile"
(("`date`") "`date --date=@1`"))))
+ (add-before 'check 'disable-failing-tests
+ (lambda _
+ (substitute* "tests/Makefile"
+ ;; Fails with ‘ERROR!!! client gethostbyaddr() failure’.
+ (("(STDTST=.*) LTsock" _ prefix) prefix)
+ ;; Fails without access to a remote NFS server.
+ (("(OPTTST=.*) LTnfs" _ prefix) prefix))))
+ (replace 'check
+ (lambda _
+ (with-directory-excursion "tests"
+ ;; Tests refuse to run on ‘unvalidated’ platforms.
+ (make-file-writable "TestDB")
+ (invoke "./Add2TestDB")
+
+ ;; The ‘standard’ tests suggest running ‘optional’ ones as well.
+ (invoke "make" "standard" "optional")
+ #t)))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))