M guix/build-system/mix.scm => guix/build-system/mix.scm +3 -0
@@ 1,5 1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2023 Pierre-Henry Fröhring <contact@phfrohring.com>
+;;; Copyright © 2025 Giacomo Leidi <goodoldpaul@autistici.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ 73,6 74,7 @@ See: https://github.com/hexpm/specifications/blob/main/endpoints.md"
#:key
source
(tests? #t)
+ (test-flags ''())
(mix-path #f) ;See MIX_PATH.
(mix-exs "mix.exs") ;See MIX_EXS.
(build-per-environment #t) ;See :build_per_environment.
@@ 107,6 109,7 @@ See: https://github.com/hexpm/specifications/blob/main/endpoints.md"
#:source #+source
#:system #$system
#:tests? #$tests?
+ #:test-flags #$test-flags
#:mix-path #$mix-path
#:mix-exs #$mix-exs
#:mix-environments '#$mix-environments
M guix/build/mix-build-system.scm => guix/build/mix-build-system.scm +5 -4
@@ 1,7 1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2023 Pierre-Henry Fröhring <contact@phfrohring.com>
;;; Copyright © 2024 Igor Goryachev <igor@goryachev.org>
-;;; Copyright © 2024 Giacomo Leidi <goodoldpaul@autistici.org>
+;;; Copyright © 2024, 2025 Giacomo Leidi <goodoldpaul@autistici.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ 119,13 119,14 @@ See: https://hexdocs.pm/mix/1.15.7/Mix.html#module-environment-variables"
"--no-prune-code-paths"))
mix-environments))
-(define* (check #:key (tests? #t) #:allow-other-keys)
+(define* (check #:key (tests? #t) (test-flags '()) #:allow-other-keys)
"Test the Mix project."
(if tests?
(begin
(setenv "MIX_ENV" "test")
- (invoke "mix" "do" "compile" "--no-deps-check" "--no-prune-code-paths" "+"
- "test" "--no-deps-check"))
+ (apply invoke "mix" "do" "compile" "--no-deps-check"
+ "--no-prune-code-paths" "+" "test"
+ "--no-deps-check" test-flags))
(format #t "tests? = ~a~%" tests?)))
(define* (remove-mix-dirs . _)