1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 13:10:33 +02:00

gnu: angband: Enable test suite.

* gnu/packages/games.scm (angband)[arguments]:
<#:tests?>: Enable tests.
<#:phases>: Add phase 'skip-failing-tests.
[native-inputs]: Add perl.

Change-Id: I8af02d830e394190954d5d3374f5eaec2cfc6cf6
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
This commit is contained in:
bdunahu
2026-03-26 17:38:54 -04:00
committed by Liliana Marie Prikler
parent ddf9f96d91
commit cb714dcd25

View File

@@ -3994,8 +3994,7 @@ that beneath its ruins lay buried an ancient evil.")
(delete-file-recursively "src/win"))))) (delete-file-recursively "src/win")))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:tests? #f ; no check target `(#:configure-flags (list (string-append "--bindir=" %output "/bin"))
#:configure-flags (list (string-append "--bindir=" %output "/bin"))
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-before 'build 'fix-infinite-loop-on-sighup (add-before 'build 'fix-infinite-loop-on-sighup
@@ -4006,8 +4005,39 @@ that beneath its ruins lay buried an ancient evil.")
(lambda _ (lambda _
(substitute* "src/ui-signals.c" (substitute* "src/ui-signals.c"
(("(SIGHUP, )SIG_IGN" _ first) (("(SIGHUP, )SIG_IGN" _ first)
(string-append first "handle_signal_abort")))))))) (string-append first "handle_signal_abort")))))
(native-inputs (list autoconf automake)) (add-before 'check 'skip-failing-tests
(lambda _
(let ((to-skip '(;; some of these may be fixable, but most try to
;; create a directory in the user's home directory.
;; Rather than reading environment variables, they
;; lookup the username using getpwnam(3) and manually
;; construct the string.
;; Generic "Suite died":
"game/basic"
"game/mage"
;; "Cannot create '//.angband/Angband'":
"effects/chain"
"effects/destruction"
"effects/earthquake"
"object/info"
"object/slays"
"player/calc-inventory"
"player/combine-pack"
"player/digging"
"player/inven-carry-num"
"player/inven-wield"
"player/timed"
;; This file likes to read /etc/passwd
"z-file/path-normalize")))
(substitute* "src/tests/Makefile"
(("include \\$\\(SUITES\\)" all)
(string-append all "\nTESTPROGS := $(filter-out "
(string-join to-skip " ")
", $(TESTPROGS))")))))))))
(native-inputs (list autoconf
automake
perl)) ;for tests
(inputs (list ncurses)) (inputs (list ncurses))
(home-page "https://rephial.org/") (home-page "https://rephial.org/")
(synopsis "Dungeon exploration roguelike") (synopsis "Dungeon exploration roguelike")