summaryrefslogtreecommitdiff
path: root/tests/scripts-build.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/scripts-build.scm')
-rw-r--r--tests/scripts-build.scm26
1 files changed, 23 insertions, 3 deletions
diff --git a/tests/scripts-build.scm b/tests/scripts-build.scm
index 32876e956a..5f91360953 100644
--- a/tests/scripts-build.scm
+++ b/tests/scripts-build.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2016, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016, 2017, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -19,6 +19,7 @@
(define-module (test-scripts-build)
#:use-module (guix tests)
#:use-module (guix store)
+ #:use-module (guix derivations)
#:use-module (guix packages)
#:use-module (guix git-download)
#:use-module (guix scripts build)
@@ -163,11 +164,16 @@
((("foo" dep1) ("bar" dep2))
(and (string=? (package-full-name dep1)
(package-full-name grep))
- (eq? (package-replacement dep1) findutils)
+ (string=? (package-full-name (package-replacement dep1))
+ (package-full-name findutils))
(string=? (package-name dep2) "chbouib")
(match (package-native-inputs dep2)
((("x" dep))
- (eq? (package-replacement dep) findutils)))))))))))
+ (with-store store
+ (string=? (derivation-file-name
+ (package-derivation store findutils))
+ (derivation-file-name
+ (package-derivation store dep))))))))))))))
(test-equal "options->transformation, with-branch"
(git-checkout (url "https://example.org")
@@ -264,5 +270,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)