summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-09-23 22:29:17 +0200
committerLudovic Courtès <ludo@gnu.org>2020-09-27 21:32:09 +0200
commitf458cfbcc54ed87b1a87dd9e150ea276f17eab74 (patch)
treeaa1f578803b0dd7e76104e8be8d77b7b3e364c36 /tests
parentd753aee0be51800d70aa16c6e60506303b2cbb49 (diff)
guix build: Add '--without-tests'.
* guix/scripts/build.scm (transform-package-tests): New procedure. (%transformations, %transformation-options) show-transformation-options-help): Add it. * tests/scripts-build.scm ("options->transformation, without-tests"): New test. * doc/guix.texi (Package Transformation Options): Document it.
Diffstat (limited to 'tests')
-rw-r--r--tests/scripts-build.scm14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/scripts-build.scm b/tests/scripts-build.scm
index 32876e956a..12114fc8f5 100644
--- a/tests/scripts-build.scm
+++ b/tests/scripts-build.scm
@@ -264,5 +264,19 @@
((("x" dep3))
(map package-source (list dep1 dep3))))))))))))
+(test-assert "options->transformation, without-tests"
+ (let* ((dep (dummy-package "dep"))
+ (p (dummy-package "foo"
+ (inputs `(("dep" ,dep)))))
+ (t (options->transformation '((without-tests . "dep")
+ (without-tests . "tar")))))
+ (with-store store
+ (let ((new (t store p)))
+ (match (bag-direct-inputs (package->bag new))
+ ((("dep" dep) ("tar" tar) _ ...)
+ ;; TODO: Check whether TAR has #:tests? #f when transformations
+ ;; apply to implicit inputs.
+ (equal? (package-arguments dep)
+ '(#:tests? #f))))))))
(test-end)