diff mbox series

[bug#47044] gnu: xvfb-run: Fix ‘xvfb-run --help’ in a pure environment.

Message ID 6e6e113e6843516a368f6abff5a536739cd99959.camel@telenet.be
State Accepted
Headers show
Series [bug#47044] gnu: xvfb-run: Fix ‘xvfb-run --help’ in a pure environment. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

M March 10, 2021, 12:14 p.m. UTC
* gnu/packages/xorg.scm (xvfb-run)[arguments]: Refer to ‘cat’
  by absolute file name, and test whether ‘xvfb-run --help’
  succeeds in a pure environment in the ‘check’ phase.
---
 gnu/packages/xorg.scm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Comments

Mathieu Othacehe July 8, 2021, 2:43 p.m. UTC | #1
Hey,

> * gnu/packages/xorg.scm (xvfb-run)[arguments]: Refer to ‘cat’
>   by absolute file name, and test whether ‘xvfb-run --help’
>   succeeds in a pure environment in the ‘check’ phase.

Pushed as 344316b455345485dfd60baaa88105599467fe9b.

Thanks,

Mathieu
diff mbox series

Patch

diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index 92ae6a824b..392a4f7c44 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -26,6 +26,7 @@ 
 ;;; Copyright © 2020, 2021 Michael Rohleder <mike@rohleder.de>
 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2020 Jean-Baptiste Note <jean-baptiste.note@m4x.org>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -6799,7 +6800,7 @@  box, and a calendar.  It uses GTK+, and will match your desktop theme.")
            (lambda _
              (chmod "xvfb-run" #o755)
              (substitute* "xvfb-run"
-               (("(\\(| )(fmt|stty|awk|kill|getopt|mktemp|touch|rm|mcookie)"
+               (("(\\(| )(fmt|stty|awk|cat|kill|getopt|mktemp|touch|rm|mcookie)"
                  _ prefix command)
                 (string-append prefix (which command)))
                ;; These also feature in UI messages, so be more strict.
@@ -6808,13 +6809,15 @@  box, and a calendar.  It uses GTK+, and will match your desktop theme.")
                 (string-append prefix (which command))))))
          (replace 'check
            ;; There are no tests included.  Here we test whether we can run
-           ;; a simple client without xvfb-run itself relying on $PATH.
+           ;; a simple client and whether xvfb-run --help succeeds
+	   ;; without xvfb-run itself relying on $PATH.
            (lambda* (#:key tests? #:allow-other-keys)
              (when tests?
                (let ((old-PATH (getenv "PATH"))
                      (xterm (which "xterm")))
                  (unsetenv "PATH")
                  (invoke "./xvfb-run" xterm "-e" "true")
+                 (invoke "./xvfb-run" "--help")
                  (setenv "PATH" old-PATH)))))
          (replace 'install
            (lambda* (#:key outputs #:allow-other-keys)