@@ -86,6 +86,7 @@ (define* (cargo-build name inputs
(vendor-dir "guix-vendor")
(cargo-build-flags ''("--release"))
(cargo-test-flags ''("--release"))
+ (cargo-skip-tests ''())
(cargo-package-flags ''("--no-metadata" "--no-verify"))
(features ''())
(skip-build? #f)
@@ -112,6 +113,7 @@ (define* (cargo-build name inputs
#:vendor-dir #$vendor-dir
#:cargo-build-flags #$(sexp->gexp cargo-build-flags)
#:cargo-test-flags #$(sexp->gexp cargo-test-flags)
+ #:cargo-skip-tests #$(sexp->gexp cargo-skip-tests)
#:cargo-package-flags #$(sexp->gexp cargo-package-flags)
#:features #$(sexp->gexp features)
#:skip-build? #$skip-build?
@@ -141,6 +143,7 @@ (define* (cargo-cross-build name
(vendor-dir "guix-vendor")
(cargo-build-flags ''("--release"))
(cargo-test-flags ''("--release"))
+ (cargo-skip-tests ''())
(cargo-package-flags ''("--no-metadata" "--no-verify"))
(features ''())
(skip-build? #f)
@@ -169,6 +172,7 @@ (define* (cargo-cross-build name
#:vendor-dir #$vendor-dir
#:cargo-build-flags #$(sexp->gexp cargo-build-flags)
#:cargo-test-flags #$(sexp->gexp cargo-test-flags)
+ #:cargo-skip-tests #$(sexp->gexp cargo-skip-tests)
#:cargo-package-flags #$(sexp->gexp cargo-package-flags)
#:features #$(sexp->gexp features)
#:skip-build? #$skip-build?
@@ -258,11 +258,19 @@ (define* (build #:key
(define* (check #:key
tests?
+ cargo-skip-tests
(cargo-test-flags '("--release"))
#:allow-other-keys)
"Run tests for a given Cargo package."
(if tests?
- (apply invoke "cargo" "test" cargo-test-flags)
+ (if cargo-skip-tests
+ (let ((test-lst (map (lambda (test)
+ (string-append "--skip=" test))
+ cargo-skip-tests)))
+ (apply invoke "cargo" "test" (append
+ cargo-test-flags
+ (cons* "--" test-lst))))
+ (apply invoke "cargo" "test" cargo-test-flags))
#t))
(define* (package #:key