From 117dc36e11c774ce4c83d432ce7085e5d36cbdc9 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 30 Sep 2018 00:43:31 -0400 Subject: 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. --- test/libremakepkg-test.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'test') 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" -- cgit v1.2.2