diff options
author | Ludovic Courtès <ludo@gnu.org> | 2012-06-01 23:29:55 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2012-06-03 23:32:06 +0200 |
commit | 26bbbb95200b4fcd16bf92ee2593fccd9fe8f32d (patch) | |
tree | ec10a193c2dfc05aef55d855f9c3fbef2d42c968 /tests/derivations.scm | |
parent | 38b3122afb5093f3094eceb4648f6ff65bd684b2 (diff) | |
download | guix-26bbbb95200b4fcd16bf92ee2593fccd9fe8f32d.tar.gz |
First stab at the `derivation' primitive.
* guix/store.scm (%store-prefix): New parameter. (store-path?, derivation-path?): New procedures. * guix/derivations.scm (write-derivation): Pass SOURCES through `object->string'. (compressed-hash, store-path, output-path, derivation): New procedures. * tests/derivations.scm (%store): New global variable. ("derivation with no inputs"): New test.
Diffstat (limited to 'tests/derivations.scm')
-rw-r--r-- | tests/derivations.scm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/derivations.scm b/tests/derivations.scm index 21ec612ee6..c3aba3f12b 100644 --- a/tests/derivations.scm +++ b/tests/derivations.scm @@ -19,10 +19,14 @@ (define-module (test-derivations) #:use-module (guix derivations) + #:use-module (guix store) #:use-module (srfi srfi-26) #:use-module (srfi srfi-64) #:use-module (rnrs io ports)) +(define %store + (false-if-exception (open-connection))) + (test-begin "derivations") (test-assert "parse & export" @@ -33,6 +37,15 @@ (and (equal? b1 b2) (equal? d1 d2)))) +(test-skip (if %store 0 1)) + +(test-assert "derivation with no inputs" + (let ((builder (add-text-to-store %store "my-builder.sh" + "#!/bin/sh\necho hello, world\n" + '()))) + (store-path? (derivation %store "foo" "x86_64-linux" builder + '() '(("HOME" . "/homeless")) '())))) + (test-end) |