summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2018-09-30 00:43:31 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2018-10-01 17:35:22 -0400
commit117dc36e11c774ce4c83d432ce7085e5d36cbdc9 (patch)
treef014a0d072f43245d3ae1a6f69bcb3f3fa1497ab /test
parent70b9f3cdcabc217609be96cfdd1fd47133aa273b (diff)
test/cases: Ditch trying to revert config customizations
With $HOME now being owned by test-common.sh instead of testenv, it's sufficiently short-lived that we don't need to worry about reverting changes we make to it.
Diffstat (limited to 'test')
-rw-r--r--test/libremakepkg-test.sh9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/libremakepkg-test.sh b/test/libremakepkg-test.sh
index eb764c8..fd86984 100644
--- a/test/libremakepkg-test.sh
+++ b/test/libremakepkg-test.sh
@@ -129,8 +129,9 @@ it_fails_if_a_hook_fails() {
cp libremakepkg.d/PKGBUILD-hello "$tmpdir/PKGBUILD"
cd "$tmpdir"
- sed -i 's/^BLACKLIST=.*/&-bogus/' "$XDG_CONFIG_HOME"/libretools/libretools.conf
- trap 'sed -i s/-bogus// "$XDG_CONFIG_HOME"/libretools/libretools.conf' RETURN
+ cat >> "$XDG_CONFIG_HOME/libretools/libretools.conf" <<-eot
+ BLACKLIST='phony://example.com'
+ eot
libremessages msg 'Creating a chroot, may take a few minutes' &>/dev/tty
testsudo libremakepkg -l "$roundup_test_name" >$tmpdir/stdout 2>$tmpdir/stderr || status=$?
@@ -147,7 +148,6 @@ it_detects_distcc_files() {
cat >> "$XDG_CONFIG_HOME/libretools/chroot.conf" <<-eot
CHROOTEXTRAPKG+=(distcc-nozeroconf socat)
eot
- trap 'sed -i /CHROOTEXTRAPKGs+=/d "$XDG_CONFIG_HOME"/libretools/chroot.conf' RETURN
libremessages msg 'Creating a chroot, may take a few minutes' &>/dev/tty
testsudo librechroot -l "$roundup_test_name" install-name distcc-nozeroconf socat
@@ -166,8 +166,7 @@ it_detects_distcc_files() {
it_doesnt_symlink_outputs() {
require network sudo || return 0
- sed -i.bak /^unset/d "$XDG_CONFIG_HOME/pacman/makepkg.conf"
- trap 'mv -f -- "$XDG_CONFIG_HOME/pacman/makepkg.conf"{.bak,}' RETURN
+ sed -i /^unset/d "$XDG_CONFIG_HOME/pacman/makepkg.conf"
cp libremakepkg.d/PKGBUILD-hello "$tmpdir/PKGBUILD"
cd "$tmpdir"