diff options
author | Leo Famulari <leo@famulari.name> | 2017-01-13 10:21:17 -0500 |
---|---|---|
committer | Leo Famulari <leo@famulari.name> | 2017-01-13 10:21:17 -0500 |
commit | cc0725914e74c4c4dec369f3e7cdb6f201b3fecd (patch) | |
tree | e68b452ed625a2db8ed10914fb0968fdc36c655d /tests/derivations.scm | |
parent | a25b6880f1398ad36aea1d0e4e4105936a8b7e70 (diff) | |
parent | ce195ba12277ec4286ad0d8ddf7294655987ea9d (diff) | |
download | guix-cc0725914e74c4c4dec369f3e7cdb6f201b3fecd.tar.gz |
Merge branch 'master' into python-tests
Diffstat (limited to 'tests/derivations.scm')
-rw-r--r-- | tests/derivations.scm | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/tests/derivations.scm b/tests/derivations.scm index 2b5aa796d4..3fbfec3793 100644 --- a/tests/derivations.scm +++ b/tests/derivations.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -279,6 +279,27 @@ (build-derivations %store (list drv)) #f))) +(unless (force %http-server-socket) + (test-skip 1)) +(test-assert "'download' built-in builder, check mode" + ;; Make sure rebuilding the 'builtin:download' derivation in check mode + ;; works. See <http://bugs.gnu.org/25089>. + (let* ((text (random-text)) + (drv (derivation %store "world" + "builtin:download" '() + #:env-vars `(("url" + . ,(object->string (%local-url)))) + #:hash-algo 'sha256 + #:hash (sha256 (string->utf8 text))))) + (and (with-http-server 200 text + (build-derivations %store (list drv))) + (with-http-server 200 text + (build-derivations %store (list drv) + (build-mode check))) + (string=? (call-with-input-file (derivation->output-path drv) + get-string-all) + text)))) + (test-equal "derivation-name" "foo-0.0" (let ((drv (derivation %store "foo-0.0" %bash '()))) @@ -1109,3 +1130,7 @@ (call-with-input-file out get-string-all)))) (test-end) + +;; Local Variables: +;; eval: (put 'with-http-server 'scheme-indent-function 2) +;; End: |