gnu: u-boot-tools: Honor the #:tests flag.

* gnu/packages/bootloaders.scm (u-boot-tools)[arguments]: Adjust the
custom 'check and 'check-x86 phases to honor the #:tests? flag.

Change-Id: I663eba70df61569928e167ffe1af9411e405da80
This commit is contained in:
Efraim Flashner 2024-11-06 12:39:59 +02:00
parent 5a0e4b60d3
commit e6ec657c49
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -926,19 +926,22 @@ CONFIG_TOOLS_LIBCRYPTO=n")
"tools/sunxi-spl-image-builder")))))
(delete 'check)
(add-after 'install 'check
(lambda* (#:key make-flags test-target #:allow-other-keys)
(invoke "test/image/test-imagetools.sh")))
(lambda* (#:key make-flags test-target tests? #:allow-other-keys)
(when tests?
(invoke "test/image/test-imagetools.sh"))))
;; Only run full test suite on x86_64 systems, as many tests
;; assume x86_64.
,@(if (string-match "^x86_64-linux"
(or (%current-target-system)
(%current-system)))
'((add-after 'check 'check-x86
(lambda* (#:key make-flags test-target #:allow-other-keys)
(apply invoke "make" "mrproper" make-flags)
(setenv "SDL_VIDEODRIVER" "dummy")
(setenv "PAGER" "cat")
(apply invoke "make" test-target make-flags))))
(lambda* (#:key make-flags test-target tests? #:allow-other-keys)
(when tests?
(begin
(apply invoke "make" "mrproper" make-flags)
(setenv "SDL_VIDEODRIVER" "dummy")
(setenv "PAGER" "cat")
(apply invoke "make" test-target make-flags))))))
'()))))
(description (string-append
(package-description u-boot)