GNU bug report logs - #63618
[PATCH WIP] Socat tests

Previous Next

Package: guix-patches;

Reported by: Bruno Victal <mirai <at> makinata.eu>

Date: Sat, 20 May 2023 21:51:02 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 63618 <at> debbugs.gnu.org (full text, mbox):

From: Bruno Victal <mirai <at> makinata.eu>
To: 63618 <at> debbugs.gnu.org
Cc: Bruno Victal <mirai <at> makinata.eu>
Subject: [PATCH WIP] gnu: socat: Enable tests.
Date: Sat, 20 May 2023 22:52:36 +0100
* gnu/packages/networking.scm (socat)[arguments]: Enable tests.
[native-inputs]: Add test dependencies: net-tools, which and procps.
---
 gnu/packages/networking.scm | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 85fb352ebf..4a2ed0e8a5 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -1204,9 +1204,25 @@ (define-public socat
                     version ".tar.bz2"))
               (sha256
                (base32
-                "01w0hpqf5xmgn40s1ablfd4y67dlrx5y9zlx24spc1qm8h81hwyl"))))
+                "01w0hpqf5xmgn40s1ablfd4y67dlrx5y9zlx24spc1qm8h81hwyl"))
+              (modules '((guix build utils)))
+              (snippet
+               #~(begin
+                   (substitute* "test.sh"
+                     (("/sbin/ifconfig") "ifconfig")
+                     (("^/bin/rm") "rm"))))))
     (build-system gnu-build-system)
-    (arguments '(#:tests? #f))          ; no test suite
+    (arguments
+     (list
+      #:test-target "test"
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'patch-source-shebangs 'patch-test-shebangs
+            (lambda* (#:key inputs #:allow-other-keys)
+              ;; test.sh embeds some shell scripts.
+              (substitute*  "test.sh"
+                (("/usr/bin/env") (search-input-file inputs "/bin/env"))))))))
+    (native-inputs (list net-tools which procps))  ; for tests
     (inputs (list openssl))
     (home-page "http://www.dest-unreach.org/socat/")
     (synopsis

base-commit: cebf0e36d1e5439f43046ec3d6d995fb18f27218
-- 
2.39.2





This bug report was last modified 39 days ago.

Previous Next


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