diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-08-23 19:18:01 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-08-23 22:33:04 +0200 |
commit | c1bc358f293b97c9575f6195c3e7a119b05199ce (patch) | |
tree | 2e75aafa414fe066598ca4f9f1b1b7eb4250c238 /tests/gexp.scm | |
parent | 90a063f4ca4e538df669103a7ffdd211e45f63d6 (diff) | |
download | guix-c1bc358f293b97c9575f6195c3e7a119b05199ce.tar.gz |
Factorize test suite support in (guix tests).
* guix/tests.scm: New file. * Makefile.am (noinst_DATA): New variable. (GOBJECTS): Add guix/tests.go. * tests/builders.scm (%store): Use 'open-connection-for-tests' from (guix tests). * tests/derivations.scm: Likewise. * tests/monads.scm: Likewise. * tests/packages.scm: Likewise. * tests/profiles.scm: Likewise. * tests/union.scm: Likewise. * tests/gexp.scm: Likewise. (guile-for-build): Remove. Use (%guile-for-build) instead. * tests/nar.scm (make-random-bytevector, %seed, random-text): Remove. (populate-file): Change 'make-random-bytevector' to 'random-bytevector'. Use (guix tests). * tests/store.scm (%seed, random-text): Remove. Use (guix tests).
Diffstat (limited to 'tests/gexp.scm')
-rw-r--r-- | tests/gexp.scm | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/tests/gexp.scm b/tests/gexp.scm index 694bd409bc..bf52401c66 100644 --- a/tests/gexp.scm +++ b/tests/gexp.scm @@ -22,6 +22,7 @@ #:use-module (guix gexp) #:use-module (guix derivations) #:use-module (guix packages) + #:use-module (guix tests) #:use-module (gnu packages) #:use-module (gnu packages base) #:use-module (gnu packages bootstrap) @@ -35,28 +36,22 @@ ;; Test the (guix gexp) module. (define %store - (open-connection)) + (open-connection-for-tests)) ;; For white-box testing. (define gexp-inputs (@@ (guix gexp) gexp-inputs)) (define gexp-native-inputs (@@ (guix gexp) gexp-native-inputs)) (define gexp->sexp (@@ (guix gexp) gexp->sexp)) -(define guile-for-build - (package-derivation %store %bootstrap-guile)) - -;; Make it the default. -(%guile-for-build guile-for-build) - (define* (gexp->sexp* exp #:optional target) (run-with-store %store (gexp->sexp exp #:target target) - #:guile-for-build guile-for-build)) + #:guile-for-build (%guile-for-build))) (define-syntax-rule (test-assertm name exp) (test-assert name (run-with-store %store exp - #:guile-for-build guile-for-build))) + #:guile-for-build (%guile-for-build)))) (test-begin "gexp") @@ -330,7 +325,7 @@ (derivation-file-name xdrv))))) (define shebang - (string-append "#!" (derivation->output-path guile-for-build) + (string-append "#!" (derivation->output-path (%guile-for-build)) "/bin/guile --no-auto-compile")) ;; If we're going to hit the silly shebang limit (128 chars on Linux-based |