unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: ngircd: Fix test suite.
@ 2015-03-30 15:00 Taylan Ulrich Bayırlı/Kammer
  2015-03-31 13:34 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Taylan Ulrich Bayırlı/Kammer @ 2015-03-30 15:00 UTC (permalink / raw)
  To: guix-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-gnu-ngircd-Fix-test-suite.patch --]
[-- Type: text/x-diff, Size: 1791 bytes --]

From 4e5f345f54395a02f87a0ce0c3e68d2b71e20259 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
 <taylanbayirli@gmail.com>
Date: Mon, 30 Mar 2015 10:37:11 +0200
Subject: [PATCH] gnu: ngircd: Fix test suite.

* gnu/packages/messaging.scm (ngircd): Overwrite getpid.sh with a more
  reliable version.
---
 gnu/packages/messaging.scm | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 462c500..fd857b1 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -201,7 +201,22 @@ dictionaries.  HexChat can be extended with multiple addons.")
         'configure 'post-configure
         (lambda _
           (substitute* "src/ngircd/Makefile"
-            (("/bin/sh") (which "sh"))))
+            (("/bin/sh") (which "sh")))
+          ;; The default getpid.sh does a sloppy grep over 'ps -ax' output,
+          ;; which fails arbitrarily.
+          (with-output-to-file "src/testsuite/getpid.sh"
+            (lambda ()
+              (display
+               (string-append
+                "#!" (which "sh") "\n"
+                "ps -C \"$1\" -o pid=\n"))))
+          ;; Our variant of getpid.sh does not work for interpreter names if a
+          ;; shebang script is run directly as "./foo", so patch cases where
+          ;; the test suite relies on this.
+          (substitute* "src/testsuite/start-server.sh"
+            ;; It runs 'getpid.sh sh' to test if it works at all.  Run it on
+            ;; 'make' instead.
+            (("getpid.sh sh") "getpid.sh make")))
         %standard-phases)))
     (home-page "http://ngircd.barton.de/")
     (synopsis "Lightweight Internet Relay Chat server for small networks")
-- 
2.2.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gnu: ngircd: Fix test suite.
  2015-03-30 15:00 [PATCH] gnu: ngircd: Fix test suite Taylan Ulrich Bayırlı/Kammer
@ 2015-03-31 13:34 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2015-03-31 13:34 UTC (permalink / raw)
  To: Taylan Ulrich "Bayırlı/Kammer"; +Cc: guix-devel

taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/Kammer") skribis:

> From 4e5f345f54395a02f87a0ce0c3e68d2b71e20259 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
>  <taylanbayirli@gmail.com>
> Date: Mon, 30 Mar 2015 10:37:11 +0200
> Subject: [PATCH] gnu: ngircd: Fix test suite.
>
> * gnu/packages/messaging.scm (ngircd): Overwrite getpid.sh with a more
>   reliable version.

LGTM.  Thanks for troubleshooting this one!

Ludo’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-31 13:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-30 15:00 [PATCH] gnu: ngircd: Fix test suite Taylan Ulrich Bayırlı/Kammer
2015-03-31 13:34 ` Ludovic Courtès

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).