;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (test-graph) #:use-module (guix tests) #:use-module (guix graph) #:use-module (guix scripts graph) #:use-module (guix packages) #:use-module (guix derivations) #:use-module (guix store) #:use-module (guix monads) #:use-module
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-09-14 15:46:33 +0200
committerLudovic Courtès <ludo@gnu.org>2021-09-14 15:49:56 +0200
commit921595fa65db00aacb5dc3cceda89359e25322f4 (patch)
treeff4de42d71e40b5beef88af678424dacedb76b42 /gnu/packages/maths.scm
parent49ab267cbec17643e265305c109dc397b5e43cf5 (diff)
downloadguix-921595fa65db00aacb5dc3cceda89359e25322f4.tar.gz
guix-921595fa65db00aacb5dc3cceda89359e25322f4.zip
gnu: gsl: Comment out more tests that fail on i686-linux.
* gnu/packages/maths.scm (gsl)[arguments]: In 'disable-failing-tests' phase, comment out more tests.
Diffstat (limited to 'gnu/packages/maths.scm')
-rw-r--r--gnu/packages/maths.scm11
1 files changed, 10 insertions, 1 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index b6fd5c9354..3672048ef2 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -552,12 +552,21 @@ precision floating point numbers.")
(substitute* "linalg/test.c"
((".*gsl_test\\(test_LU_decomp.*") "\n")
((".*gsl_test\\(test_LUc_decomp.*") "\n")
+ ((".*gsl_test\\(test_QR_decomp_r.*") "\n")
((".*gsl_test\\(test_cholesky_decomp.*") "\n")
+ ((".*gsl_test\\(test_pcholesky_solve.*") "\n")
((".*gsl_test\\(test_COD_lssolve2.*") "\n"))
(substitute* "spmatrix/test.c"
((".*test_all.*") "\n")
((".*test_float.*") "\n")
- ((".*test_complex.*") "\n"))))))
+ ((".*test_complex.*") "\n"))
+
+ ;; XXX: These tests abort with:
+ ;; gsl: cholesky.c:645: ERROR: matrix is not positive definite
+ (substitute* '("multifit_nlinear/test.c"
+ "multilarge_nlinear/test.c")
+ (("gsl_ieee_env_setup.*" all)
+ (string-append "exit (77);\n" all)))))))
(else '()))))))
(home-page "https://www.gnu.org/software/gsl/")
rom O to G. (find (match-lambda ((source target) (and (string=? source o*) (string=? target (derivation-file-name g))))) edges))))))))) (test-assert "reverse bag DAG" (let-values (((dune bap ocaml-base) (values (specification->package "ocaml4.07-dune") (specification->package "bap") (specification->package "ocaml4.07-base"))) ((backend nodes+edges) (make-recording-backend))) (run-with-store %store (export-graph (list dune) 'port #:node-type %reverse-bag-node-type #:backend backend)) (run-with-store %store (mlet %store-monad ((dune-drv (package->derivation dune)) (bap-drv (package->derivation bap)) (ocaml-base-drv (package->derivation ocaml-base))) ;; OCAML-BASE uses 'dune-build-system' so DUNE is a direct dependency. ;; BAP is much higher in the stack but it should be there. (let-values (((nodes edges) (nodes+edges))) (return (and (member `(,(derivation-file-name bap-drv) ,(package-full-name bap)) nodes) (->bool (member (map derivation-file-name (list dune-drv ocaml-base-drv)) edges))))))))) (test-assert "derivation DAG" (let-values (((backend nodes+edges) (make-recording-backend))) (run-with-store %store (mlet* %store-monad ((txt (text-file "text-file" "Hello!")) (guile (package->derivation %bootstrap-guile)) (drv (gexp->derivation "output" #~(symlink #$txt #$output) #:guile-for-build guile))) ;; We should get at least these 3 nodes and corresponding edges. (mbegin %store-monad (export-graph (list drv) 'port #:node-type %derivation-node-type #:backend backend) (let-values (((nodes edges) (nodes+edges))) ;; XXX: For some reason we need to throw in some 'basename'. (return (and (match nodes (((ids labels) ...) (let ((ids (map basename ids))) (every (lambda (item) (member (basename item) ids)) (list txt (derivation-file-name drv) (derivation-file-name guile)))))) (every (cut member <> (map (lambda (edge) (map basename edge)) edges)) (list (map (compose basename derivation-file-name) (list drv guile)) (list (basename (derivation-file-name drv)) (basename txt)))))))))))) (test-assert "reference DAG" (let-values (((backend nodes+edges) (make-recording-backend))) (run-with-store %store (mlet* %store-monad ((txt (text-file "text-file" "Hello!")) (guile (package->derivation %bootstrap-guile)) (drv (gexp->derivation "output" #~(symlink #$txt #$output) #:guile-for-build guile)) (out -> (derivation->output-path drv))) ;; We should see only OUT and TXT, with an edge from the former to the ;; latter. (mbegin %store-monad (built-derivations (list drv)) (export-graph (list (derivation->output-path drv)) 'port #:node-type %reference-node-type #:backend backend) (let-values (((nodes edges) (nodes+edges))) (return (and (equal? (match nodes (((ids labels) ...) ids)) (list out txt)) (equal? edges `((,out ,txt))))))))))) (test-assert "referrer DAG" (let-values (((backend nodes+edges) (make-recording-backend))) (run-with-store %store (mlet* %store-monad ((txt (text-file "referrer-node" (random-text))) (drv (gexp->derivation "referrer" #~(symlink #$txt #$output))) (out -> (derivation->output-path drv))) ;; We should see only TXT and OUT, with an edge from the former to the ;; latter. (mbegin %store-monad (built-derivations (list drv)) (export-graph (list txt) 'port #:node-type %referrer-node-type #:backend backend) (let-values (((nodes edges) (nodes+edges))) (return (and (equal? (match nodes (((ids labels) ...) ids)) (list txt out)) (equal? edges `((,txt ,out))))))))))) (test-assert "module graph" (let-values (((backend nodes+edges) (make-recording-backend))) (run-with-store %store (export-graph '((gnu packages guile)) 'port #:node-type %module-node-type #:backend backend)) (let-values (((nodes edges) (nodes+edges))) (and (member '(gnu packages guile) (match nodes (((ids labels) ...) ids))) (->bool (and (member (list '(gnu packages guile) '(gnu packages libunistring)) edges) (member (list '(gnu packages guile) '(gnu packages bdw-gc)) edges))))))) (test-assert "node-edges" (run-with-store %store (let ((packages (fold-packages cons '()))) (mlet %store-monad ((edges (node-edges %package-node-type packages))) (return (and (null? (edges hello)) (lset= eq? (edges guile-2.0) (match (package-direct-inputs guile-2.0) (((labels packages _ ...) ...) packages))))))))) (test-assert "node-transitive-edges + node-back-edges" (run-with-store %store (let ((packages (fold-packages cons '())) (bootstrap? (lambda (package) (string-contains (location-file (package-location package)) "bootstrap.scm"))) (trivial? (lambda (package) (eq? (package-build-system package) trivial-build-system)))) (mlet %store-monad ((edges (node-back-edges %bag-node-type packages))) (let* ((glibc (canonical-package glibc)) (dependents (node-transitive-edges (list glibc) edges)) (diff (lset-difference eq? packages dependents))) ;; All the packages depend on libc, except bootstrap packages and ;; some that use TRIVIAL-BUILD-SYSTEM. (return (null? (remove (lambda (package) (or (trivial? package) (bootstrap? package))) diff)))))))) (test-assert "node-transitive-edges, no duplicates" (run-with-store %store (let* ((p0 (dummy-package "p0")) (p1a (dummy-package "p1a" (inputs `(("p0" ,p0))))) (p1b (dummy-package "p1b" (inputs `(("p0" ,p0))))) (p2 (dummy-package "p2" (inputs `(("p1a" ,p1a) ("p1b" ,p1b)))))) (mlet %store-monad ((edges (node-edges %package-node-type (list p2 p1a p1b p0)))) (return (lset= eq? (node-transitive-edges (list p2) edges) (list p1a p1b p0))))))) (test-assert "node-transitive-edges, references" (run-with-store %store (mlet* %store-monad ((d0 (package->derivation %bootstrap-guile)) (d1 (gexp->derivation "d1" #~(begin (mkdir #$output) (symlink #$%bootstrap-guile (string-append #$output "/l"))))) (d2 (gexp->derivation "d2" #~(begin (mkdir #$output) (symlink #$d1 (string-append #$output "/l"))))) (_ (built-derivations (list d2))) (->node -> (node-type-convert %reference-node-type)) (o2 (->node (derivation->output-path d2))) (o1 (->node (derivation->output-path d1))) (o0 (->node (derivation->output-path d0))) (edges (node-edges %reference-node-type (append o0 o1 o2))) (reqs ((store-lift requisites) o2))) (return (lset= string=? (append o2 (node-transitive-edges o2 edges)) reqs))))) (test-equal "node-reachable-count" '(3 3) (run-with-store %store (let* ((p0 (dummy-package "p0")) (p1a (dummy-package "p1a" (inputs `(("p0" ,p0))))) (p1b (dummy-package "p1b" (inputs `(("p0" ,p0))))) (p2 (dummy-package "p2" (inputs `(("p1a" ,p1a) ("p1b" ,p1b)))))) (mlet* %store-monad ((all -> (list p2 p1a p1b p0)) (edges (node-edges %package-node-type all)) (back (node-back-edges %package-node-type all))) (return (list (node-reachable-count (list p2) edges) (node-reachable-count (list p0) back))))))) (test-equal "shortest-path, packages + derivations" '(("p5" "p4" "p1" "p0") ("p3" "p2" "p1" "p0") #f ("p5-0.drv" "p4-0.drv" "p1-0.drv" "p0-0.drv")) (run-with-store %store (let* ((p0 (dummy-package "p0")) (p1 (dummy-package "p1" (inputs `(("p0" ,p0))))) (p2 (dummy-package "p2" (inputs `(("p1" ,p1))))) (p3 (dummy-package "p3" (inputs `(("p2" ,p2))))) (p4 (dummy-package "p4" (inputs `(("p1" ,p1))))) (p5 (dummy-package "p5" (inputs `(("p4" ,p4) ("p3" ,p3)))))) (mlet* %store-monad ((path1 (shortest-path p5 p0 %package-node-type)) (path2 (shortest-path p3 p0 %package-node-type)) (nope (shortest-path p3 p4 %package-node-type)) (drv5 (package->derivation p5)) (drv0 (package->derivation p0)) (path3 (shortest-path drv5 drv0 %derivation-node-type))) (return (append (map (lambda (path) (and path (map package-name path))) (list path1 path2 nope)) (list (map (node-type-label %derivation-node-type) path3)))))))) (test-equal "shortest-path, reverse packages" '("libffi" "guile" "guile-json") (run-with-store %store (mlet %store-monad ((path (shortest-path (specification->package "libffi") guile-json %reverse-package-node-type))) (return (map package-name path))))) (test-equal "shortest-path, references" `(("d2" "d1" ,(package-full-name %bootstrap-guile "-")) (,(package-full-name %bootstrap-guile "-") "d1" "d2")) (run-with-store %store (mlet* %store-monad ((d0 (package->derivation %bootstrap-guile)) (d1 (gexp->derivation "d1" #~(begin (mkdir #$output) (symlink #$%bootstrap-guile (string-append #$output "/l"))))) (d2 (gexp->derivation "d2" #~(begin (mkdir #$output) (symlink #$d1 (string-append #$output "/l"))))) (_ (built-derivations (list d2))) (->node -> (node-type-convert %reference-node-type)) (o2 (->node (derivation->output-path d2))) (o0 (->node (derivation->output-path d0))) (path (shortest-path (first o2) (first o0) %reference-node-type)) (rpath (shortest-path (first o0) (first o2) %referrer-node-type))) (return (list (map (node-type-label %reference-node-type) path) (map (node-type-label %referrer-node-type) rpath)))))) (test-end "graph")