[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/07: tests: Disable tests that would rebuild the world due to grafting
From: |
Ludovic Courtès |
Subject: |
07/07: tests: Disable tests that would rebuild the world due to grafting. |
Date: |
Fri, 04 Mar 2016 23:19:37 +0000 |
civodul pushed a commit to branch master
in repository guix.
commit b4c42a4b07bab254d0894c0ab8abc95ff0fd261a
Author: Ludovic Courtès <address@hidden>
Date: Sat Mar 5 00:06:15 2016 +0100
tests: Disable tests that would rebuild the world due to grafting.
The Perl replacement added in d8173f2 leads some tests to involve
grafting, which in turn triggers derivation builds that rebuild the
world. Work around that.
* tests/packages.scm: Add call to '%graft?'.
("package-derivation, direct graft")
("package-cross-derivation, direct graft"): Comment out.
---
tests/packages.scm | 42 +++++++++++++++++++++++++++---------------
1 files changed, 27 insertions(+), 15 deletions(-)
diff --git a/tests/packages.scm b/tests/packages.scm
index f7af5d4..9a2dbee 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -56,6 +56,10 @@
(define %store
(open-connection-for-tests))
+;; Globally disable grafting to avoid rebuilding the world ('graft-derivation'
+;; can trigger builds early.)
+(%graft? #f)
+
(test-begin "packages")
@@ -550,17 +554,23 @@
(package-cross-derivation %store p "mips64el-linux-gnu")
#f)))
-(test-equal "package-derivation, direct graft"
- (package-derivation %store gnu-make)
- (let ((p (package (inherit coreutils)
- (replacement gnu-make))))
- (package-derivation %store p)))
+;; XXX: The next two tests can trigger builds when the distro defines
+;; replacements on core packages, so they're disable for lack of a better
+;; solution.
+
+;; (test-equal "package-derivation, direct graft"
+;; (package-derivation %store gnu-make #:graft? #f)
+;; (let ((p (package (inherit coreutils)
+;; (replacement gnu-make))))
+;; (package-derivation %store p #:graft? #t)))
-(test-equal "package-cross-derivation, direct graft"
- (package-cross-derivation %store gnu-make "mips64el-linux-gnu")
- (let ((p (package (inherit coreutils)
- (replacement gnu-make))))
- (package-cross-derivation %store p "mips64el-linux-gnu")))
+;; (test-equal "package-cross-derivation, direct graft"
+;; (package-cross-derivation %store gnu-make "mips64el-linux-gnu"
+;; #:graft? #f)
+;; (let ((p (package (inherit coreutils)
+;; (replacement gnu-make))))
+;; (package-cross-derivation %store p "mips64el-linux-gnu"
+;; #:graft? #t)))
(test-assert "package-grafts, indirect grafts"
(let* ((new (dummy-package "dep"
@@ -584,11 +594,13 @@
(arguments '(#:implicit-inputs? #f))
(inputs `(("dep" ,dep*)))))
(target "mips64el-linux-gnu"))
- (equal? (package-grafts %store dummy #:target target)
- (list (graft
- (origin (package-cross-derivation %store dep target))
- (replacement
- (package-cross-derivation %store new target)))))))
+ ;; XXX: There might be additional grafts, for instance if the distro
+ ;; defines replacements for core packages like Perl.
+ (member (graft
+ (origin (package-cross-derivation %store dep target))
+ (replacement
+ (package-cross-derivation %store new target)))
+ (package-grafts %store dummy #:target target))))
(test-assert "package-grafts, indirect grafts, propagated inputs"
(let* ((new (dummy-package "dep"
- branch master updated (eda0522 -> b4c42a4), Ludovic Courtès, 2016/03/04
- 03/07: store: Add 'references/substitutes'., Ludovic Courtès, 2016/03/04
- 01/07: guix build: Set the build options early., Ludovic Courtès, 2016/03/04
- 06/07: grafts: Memoize intermediate results in 'cumulative-grafts'., Ludovic Courtès, 2016/03/04
- 05/07: packages: The result of 'bag-grafts' does not contain duplicates., Ludovic Courtès, 2016/03/04
- 02/07: tests: Narinfos can specify an non-empty reference list., Ludovic Courtès, 2016/03/04
- 04/07: grafts: Use dependency information from substitutes when possible., Ludovic Courtès, 2016/03/04
- 07/07: tests: Disable tests that would rebuild the world due to grafting.,
Ludovic Courtès <=