mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 05:48:07 -05:00
tests: Fix etc/profile test.
* tests/profiles.scm ("etc/profile"): Unset GUIX_PROFILE before sourcing etc/profile. Use '.' instead of 'source' for sourcing. Call 'echo $PATH' instead of using the output of 'set' to determine whether PATH is set.
This commit is contained in:
parent
56203284b6
commit
9e006fb3de
1 changed files with 8 additions and 6 deletions
|
@ -237,14 +237,16 @@ (define glibc
|
|||
(mbegin %store-monad
|
||||
(built-derivations (list drv))
|
||||
(let* ((pipe (open-input-pipe
|
||||
(string-append "source "
|
||||
profile "/etc/profile; "
|
||||
"unset GUIX_PROFILE; set")))
|
||||
(env (get-string-all pipe)))
|
||||
(string-append "unset GUIX_PROFILE; "
|
||||
;; 'source' is a Bashism; use '.' (dot).
|
||||
". " profile "/etc/profile; "
|
||||
;; Don't try to parse set(1) output because
|
||||
;; it differs among shells; just use echo.
|
||||
"echo $PATH")))
|
||||
(path (get-string-all pipe)))
|
||||
(return
|
||||
(and (zero? (close-pipe pipe))
|
||||
(string-contains env
|
||||
(string-append "PATH=" profile "/bin"))))))))
|
||||
(string-contains path (string-append profile "/bin"))))))))
|
||||
|
||||
(test-end "profiles")
|
||||
|
||||
|
|
Loading…
Reference in a new issue