guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[shepherd] 04/04: guix: On Linux, run tests also without ‘signalfd’ supp


From: Ludovic Courtès
Subject: [shepherd] 04/04: guix: On Linux, run tests also without ‘signalfd’ support.
Date: Fri, 29 Dec 2023 18:30:26 -0500 (EST)

civodul pushed a commit to branch main
in repository shepherd.

commit 865215acbaf0dce4aaad36ae526b22cdf7b1ba13
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sat Dec 30 00:25:49 2023 +0100

    guix: On Linux, run tests also without ‘signalfd’ support.
    
    * guix.scm (shepherd)[arguments]: Add ‘check-without-signalfd’ phase.
---
 .guix/modules/shepherd-package.scm | 40 +++++++++++++++++++++++---------------
 1 file changed, 24 insertions(+), 16 deletions(-)

diff --git a/.guix/modules/shepherd-package.scm 
b/.guix/modules/shepherd-package.scm
index e8b1c3d..e1f95ec 100644
--- a/.guix/modules/shepherd-package.scm
+++ b/.guix/modules/shepherd-package.scm
@@ -75,22 +75,30 @@
     (arguments
      (list #:configure-flags #~'("--localstatedir=/var")
            #:phases
-           (if (%current-target-system)
-               #~(modify-phases %standard-phases
-                   (add-before 'configure 'set-fibers-directory
-                     (lambda _
-                       ;; When cross-compiling, refer to the target
-                       ;; Fibers, not the native one.
-                       (substitute* '("herd.in" "shepherd.in")
-                         (("%FIBERS_SOURCE_DIRECTORY%")
-                          #$(file-append
-                             (this-package-input "guile-fibers")
-                             "/share/guile/site/3.0"))
-                         (("%FIBERS_OBJECT_DIRECTORY%")
-                          #$(file-append
-                             (this-package-input "guile-fibers")
-                             "/lib/guile/3.0/site-ccache"))))))
-               #~%standard-phases)))
+           #~(modify-phases %standard-phases
+               (add-before 'configure 'set-fibers-directory
+                 (lambda* (#:key target #:allow-other-keys)
+                   (when target
+                     ;; When cross-compiling, refer to the target
+                     ;; Fibers, not the native one.
+                     (substitute* '("herd.in" "shepherd.in")
+                       (("%FIBERS_SOURCE_DIRECTORY%")
+                        #$(file-append
+                           (this-package-input "guile-fibers")
+                           "/share/guile/site/3.0"))
+                       (("%FIBERS_OBJECT_DIRECTORY%")
+                        #$(file-append
+                           (this-package-input "guile-fibers")
+                           "/lib/guile/3.0/site-ccache"))))))
+               (add-after 'check 'check-without-signalfd
+                 (lambda* (#:key target tests? #:allow-other-keys)
+                   ;; On Linux, test without 'signalfd' support.
+                   (when (and tests? (not target)
+                              (string-contains %host-type "linux"))
+                     (setenv "SHEPHERD_DISABLE_SIGNALFD" "1")
+                     (invoke "make" "check" "-j"
+                             (number->string (parallel-job-count)))
+                     (unsetenv "SHEPHERD_DISABLE_SIGNALFD")))))))
 
     (native-inputs
      ;; Use 'specification->package' to get the latest version of those



reply via email to

[Prev in Thread] Current Thread [Next in Thread]