diff mbox series

[bug#47333,2/2] Enable test of minetest

Message ID 20210323000634.2337-2-lasnesne@lagunposprasihopre.org
State Accepted
Headers show
Series [bug#47332,1/2] Update minetest and minetest-data to 5.4.0 | expand

Checks

Context Check Description
cbaines/submitting builds success
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

la snesne March 23, 2021, 12:06 a.m. UTC
---
 gnu/packages/games.scm | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

Comments

M March 23, 2021, 7:31 a.m. UTC | #1
On Tue, 2021-03-23 at 09:06 +0900, la snesne wrote:
> -       #:tests? #f))                    ;no check target
> +       #:phases
> +       (modify-phases %standard-phases
> +         (replace 'check
> +           (lambda _
> +             (setenv "HOME" "/tmp")
> +             (invoke (string-append "../" ,name "-" ,version
> +                                    "-checkout/bin/minetest")
> +                     "--run-unittests")
> +             #t)))))

For most packages, this is unlikely to work when cross-compiling.
I suggest replacing it with something like

> +           (unless ,(%current-target-system)
> +             (invoke (string-append "../" ,name "-" ,version
> +                                    "-checkout/bin/minetest")
> +                     "--run-unittests"))
> +           #t

Well, cross-compiling minetest won't work anyway as a dependency is not
cross-compilable:

$ guix build minetest --target=aarch64-linux-gnu
$ guix build: error: gnu/packages/gl.scm:236:2: mesa@20.2.4: build system `meson' does not support cross builds

(and I see little reason to cross-compilable minetest)
... but it still seems a good idea to avoid introducing new
cross-compilation issues when we can avoid it.

Greetings,
Maxime
diff mbox series

Patch

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index f1ee7e9971..0ccbde636a 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -3482,7 +3482,7 @@  match, cannon keep, and grave-itation pit.")
                   #t))))
     (build-system cmake-build-system)
     (arguments
-     '(#:configure-flags
+     `(#:configure-flags
        (list "-DRUN_IN_PLACE=0"
              "-DENABLE_FREETYPE=1"
              "-DENABLE_GETTEXT=1"
@@ -3493,7 +3493,15 @@  match, cannon keep, and grave-itation pit.")
              (string-append "-DCURL_INCLUDE_DIR="
                             (assoc-ref %build-inputs "curl")
                             "/include/curl"))
-       #:tests? #f))                    ;no check target
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (setenv "HOME" "/tmp")
+             (invoke (string-append "../" ,name "-" ,version
+                                    "-checkout/bin/minetest")
+                     "--run-unittests")
+             #t)))))
     (native-search-paths
      (list (search-path-specification
             (variable "MINETEST_SUBGAME_PATH")