;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès ;;; Copyright © 2014 Alex Kost ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (test-profiles) #:use-module (guix tests) #:use-module (guix profiles) #:use-module (guix store) #:u
aboutsummaryrefslogtreecommitdiff
path: root/gnu
ModeNameSize
-rw-r--r--artwork.scm1605logplainabout
-rw-r--r--bootloader.scm8944logplainabout
d---------bootloader157logplain
d---------build745logplain
-rw-r--r--ci.scm23928logplainabout
-rw-r--r--image.scm3439logplainabout
-rw-r--r--installer.scm18954logplainabout
d---------installer635logplain
-rw-r--r--local.mk79342logplainabout
-rw-r--r--machine.scm4858logplainabout
d---------machine80logplain
-rw-r--r--packages.scm22591logplainabout
d---------packages19917logplain
-rw-r--r--services.scm40282logplainabout
d---------services1914logplain
-rw-r--r--system.scm56429logplainabout
d---------system657logplain
-rw-r--r--tests.scm11130logplainabout
d---------tests1035logplain
file (string-append out "/etc/foo") (lambda (port) (display "foo!" port)))))))) (entry -> (package->manifest-entry thing)) (drv (profile-derivation (manifest (list entry)) #:hooks '())) (profile -> (derivation->output-path drv))) (mbegin %store-monad (built-derivations (list drv)) (return (and (file-exists? (string-append profile "/etc/profile")) (string=? (call-with-input-file (string-append profile "/etc/foo") get-string-all) "foo!")))))) (test-assertm "etc/profile when etc/ is a symlink" ;; When etc/ is a symlink, the unsymlink code in 0.8.2 would fail ;; gracelessly because 'scandir' would return #f. (mlet* %store-monad ((thing -> (dummy-package "dummy" (build-system trivial-build-system) (arguments `(#:guile ,%bootstrap-guile #:builder (let ((out (assoc-ref %outputs "out"))) (mkdir out) (mkdir (string-append out "/foo")) (symlink "foo" (string-append out "/etc")) (call-with-output-file (string-append out "/etc/bar") (lambda (port) (display "foo!" port)))))))) (entry -> (package->manifest-entry thing)) (drv (profile-derivation (manifest (list entry)) #:hooks '())) (profile -> (derivation->output-path drv))) (mbegin %store-monad (built-derivations (list drv)) (return (and (file-exists? (string-append profile "/etc/profile")) (string=? (call-with-input-file (string-append profile "/etc/bar") get-string-all) "foo!")))))) (test-end "profiles") ;;; Local Variables: ;;; eval: (put 'dummy-package 'scheme-indent-function 1) ;;; End: