~ruther/guix-local

04ad78093a9076c47c16f725dfb0b6a20d6f6676 — Yelninei 4 months ago 5e111f9
gnu: grep: Don't override XFAIL_TESTS on 32bit Hurd.

Some tests in grep are marked as XFAIL.
Setting XFAIL_TESTS will cause these to fail.

Fixes guix/guix#4083.

* gnu/packages/base.scm (grep)[arguments]: Move skipping of test-year2038 on
32bit hurd from make-flags to a phase.

Change-Id: I4e42fe64f7ff8213bf43147c9e444891d3bedb91
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
1 files changed, 11 insertions(+), 9 deletions(-)

M gnu/packages/base.scm
M gnu/packages/base.scm => gnu/packages/base.scm +11 -9
@@ 133,15 133,6 @@ command-line arguments, multiple languages, and so on.")
   (inputs (list pcre2))
   (arguments
    (list #:configure-flags #~(list "--enable-perl-regexp")

          ;; XXX: On 32-bit Hurd platforms, 'time_t' is defined as a 32-bit
          ;; integer in 'hurd_types.defs', so this Gnulib test always fails.
          #:make-flags
          #~#$(if (and (not (%current-target-system))
                       (target-hurd32?))
                  #~'("XFAIL_TESTS=test-year2038")
                  #~'())

          #:phases
          #~(modify-phases %standard-phases
              (add-after 'install 'fix-egrep-and-fgrep


@@ 161,6 152,17 @@ command-line arguments, multiple languages, and so on.")
                            (substitute* "lib/sigsegv.in.h"
                              (("__GNU__") "__XGNU__")))))
                     #~())
              ;; XXX: On 32-bit Hurd platforms, 'time_t' is defined as a 32-bit
              ;; integer in 'hurd_types.defs', so this Gnulib test always fails.
              ;; Use a phase instead of XFAIL_TESTS to not override
              ;; xfailing tests in grep
              #$@(if (target-hurd32?)
                     #~((add-after 'unpack 'skip-year2038-test
                          (lambda _
                            (substitute* "gnulib-tests/test-year2038.c"
                              (("(^| )main *\\(.*" all)
                               (string-append all "{\n  return 77;//"))))))
                     #~())
              #$@(if (system-hurd?)
                     #~((add-before 'check 'skip-test
                          (lambda _