diff options
author | Ludovic Courtès <[email protected]> | 2015-02-11 22:27:05 +0100 |
---|---|---|
committer | Ludovic Courtès <[email protected]> | 2015-02-11 22:28:21 +0100 |
commit | 605217beaa6399c62e6b333db75afae722db099a (patch) | |
tree | c8b29b64810fb7dc207d341fa8557b4f098ce24c /tests/gexp.scm | |
parent | a4a17ec36ed75b688a3658e353f0975f94a48d4a (diff) | |
parent | c8351d9a409879b3d948db3713ce4fe4b787bcd0 (diff) |
Merge branch 'master' into core-updates
Diffstat (limited to 'tests/gexp.scm')
-rw-r--r-- | tests/gexp.scm | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/gexp.scm b/tests/gexp.scm index d80f14344d..03722e4669 100644 --- a/tests/gexp.scm +++ b/tests/gexp.scm @@ -27,6 +27,7 @@ #:use-module (gnu packages base) #:use-module (gnu packages bootstrap) #:use-module (srfi srfi-1) + #:use-module (srfi srfi-34) #:use-module (srfi srfi-64) #:use-module (rnrs io ports) #:use-module (ice-9 match) @@ -396,6 +397,30 @@ (equal? (call-with-input-file g-guile read) (list (derivation->output-path guile-drv))))))) +(test-assertm "gexp->derivation #:allowed-references" + (mlet %store-monad ((drv (gexp->derivation "allowed-refs" + #~(begin + (mkdir #$output) + (chdir #$output) + (symlink #$output "self") + (symlink #$%bootstrap-guile + "guile")) + #:allowed-references + (list "out" %bootstrap-guile)))) + (built-derivations (list drv)))) + +(test-assert "gexp->derivation #:allowed-references, disallowed" + (let ((drv (run-with-store %store + (gexp->derivation "allowed-refs" + #~(begin + (mkdir #$output) + (chdir #$output) + (symlink #$%bootstrap-guile "guile")) + #:allowed-references '())))) + (guard (c ((nix-protocol-error? c) #t)) + (build-derivations %store (list drv)) + #f))) + (define shebang (string-append "#!" (derivation->output-path (%guile-for-build)) "/bin/guile --no-auto-compile")) |