diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-06-03 21:03:49 -0600 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-06-05 20:01:07 -0600 |
commit | ef468d692bee233b37d7853098612c5b2d17423f (patch) | |
tree | 5bc06ebc0c618154c74e79ac86bdeacb1f6ccdb9 /test | |
parent | 0615f9f304be0cebc72e5a7bbcb93e8f2220e672 (diff) |
unit tests: sudo was unsetting LIBRETOOLS_LIBDIR
Diffstat (limited to 'test')
-rw-r--r-- | test/lib-conf-test.sh | 2 | ||||
-rw-r--r-- | test/librechroot-test.sh | 6 | ||||
-rw-r--r-- | test/libremakepkg-test.sh | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/test/lib-conf-test.sh b/test/lib-conf-test.sh index eeea287..0ee0f62 100644 --- a/test/lib-conf-test.sh +++ b/test/lib-conf-test.sh @@ -25,7 +25,7 @@ it_figures_out_HOME_when_root() { cd "$tmpdir" echo '. $(librelib conf.sh); echo "$LIBREHOME"' > test.sh - LIBREHOME=$(sudo bash ./test.sh) + LIBREHOME=$(sudo -EH bash ./test.sh) [[ $LIBREHOME == $HOME ]] } diff --git a/test/librechroot-test.sh b/test/librechroot-test.sh index c9fa130..c34af6e 100644 --- a/test/librechroot-test.sh +++ b/test/librechroot-test.sh @@ -14,7 +14,7 @@ after() { } it_creates_repo_for_new_chroots() { - sudo librechroot run test -r /repo/repo.db + sudo -EH librechroot run test -r /repo/repo.db } it_displays_help_as_normal_user() { @@ -41,7 +41,7 @@ it_displays_help_and_fails_with_0_args() { } it_fails_for_unknown_commands() { - sudo librechroot phony >$tmpdir/stdout 2>$tmpdir/stderr || stat=$? + sudo -EH librechroot phony >$tmpdir/stdout 2>$tmpdir/stderr || stat=$? [[ $stat != 0 ]] [[ -z "$(cat $tmpdir/stdout)" ]] @@ -49,7 +49,7 @@ it_fails_for_unknown_commands() { } it_fails_for_unknown_flags() { - sudo librechroot -q >$tmpdir/stdout 2>$tmpdir/stderr || stat=$? + sudo -EH librechroot -q >$tmpdir/stdout 2>$tmpdir/stderr || stat=$? [[ $stat != 0 ]] [[ -z "$(cat $tmpdir/stdout)" ]] diff --git a/test/libremakepkg-test.sh b/test/libremakepkg-test.sh index 5ea3b59..b014da7 100644 --- a/test/libremakepkg-test.sh +++ b/test/libremakepkg-test.sh @@ -17,7 +17,7 @@ it_builds_a_trivial_package() { cp libremakepkg.d/PKGBUILD-hello "$tmpdir/PKGBUILD" cd "$tmpdir" - sudo libremakepkg &>/dev/null + sudo -EH libremakepkg &>/dev/null [[ -f $(echo libretools-hello-1.0-1-any.pkg.tar.?z) ]] } |