unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Bruno Victal <mirai@makinata.eu>
To: 63618@debbugs.gnu.org
Cc: Bruno Victal <mirai@makinata.eu>
Subject: [bug#63618] [PATCH WIP] gnu: socat: Enable tests.
Date: Sat, 20 May 2023 22:52:36 +0100	[thread overview]
Message-ID: <7c25727597e6730d9caf4f5e9b1b69d8fefd44f5.1684619533.git.mirai@makinata.eu> (raw)
In-Reply-To: <fc41352a-62bd-88fd-361a-9a847c372189@makinata.eu>

* 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





      reply	other threads:[~2023-05-20 21:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-20 21:50 [bug#63618] [PATCH WIP] Socat tests Bruno Victal
2023-05-20 21:52 ` Bruno Victal [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7c25727597e6730d9caf4f5e9b1b69d8fefd44f5.1684619533.git.mirai@makinata.eu \
    --to=mirai@makinata.eu \
    --cc=63618@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).