gnu: julia-build-system: Enable tests.
This commit is contained in:
parent
e78c808796
commit
97139da96b
|
@ -75,7 +75,7 @@
|
|||
|
||||
(define* (julia-build store name inputs
|
||||
#:key source
|
||||
(tests? #f)
|
||||
(tests? #t)
|
||||
(phases '(@ (guix build julia-build-system)
|
||||
%standard-phases))
|
||||
(outputs '("out"))
|
||||
|
|
|
@ -78,13 +78,17 @@
|
|||
(invoke-julia (string-append "using " package)))
|
||||
#t)
|
||||
|
||||
(define* (check #:key source inputs outputs #:allow-other-keys)
|
||||
(define* (check #:key tests? source inputs outputs #:allow-other-keys)
|
||||
(when tests?
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(package (strip-store-file-name source))
|
||||
(builddir (string-append out "/share/julia/")))
|
||||
(setenv "JULIA_DEPOT_PATH" builddir)
|
||||
(setenv "JULIA_LOAD_PATH" (generate-load-path inputs outputs))
|
||||
(invoke-julia (string-append "using Pkg;Pkg.test(\"" package "\")")))
|
||||
(display builddir)
|
||||
(invoke "julia" (string-append builddir
|
||||
"packages/"
|
||||
package "/test/runtests.jl"))))
|
||||
#t)
|
||||
|
||||
(define (julia-create-package-toml outputs source
|
||||
|
@ -119,7 +123,7 @@ version = \"" version "\"
|
|||
(delete 'check) ; tests must be run after installation
|
||||
(replace 'install install)
|
||||
(add-after 'install 'precompile precompile)
|
||||
;; (add-after 'install 'check check)
|
||||
(add-after 'install 'check check)
|
||||
;; TODO: In the future we could add a "system-image-generation" phase
|
||||
;; where we use PackageCompiler.jl to speed up package loading times
|
||||
(delete 'configure)
|
||||
|
|
Loading…
Reference in New Issue