From f165e9a91118936e72f7df836446541c093c8329 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= Date: Wed, 6 May 2015 20:13:31 +0200 Subject: [PATCH] tests: Fix etc/profile test. * tests/profiles.scm ("etc/profile"): Unset GUIX_PROFILE before sourcing etc/profile. Use '.' instead of 'source' for sourcing, since the latter is a Bashism. Call 'echo $PATH' instead of using the output of 'set' to determine whether PATH is set, because the output of 'set' differs between shells. --- tests/profiles.scm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/profiles.scm b/tests/profiles.scm index a397171..6b1a907 100644 --- a/tests/profiles.scm +++ b/tests/profiles.scm @@ -237,14 +237,13 @@ (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; " + ". " profile "/etc/profile; " + "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") -- 2.2.1