summaryrefslogtreecommitdiff
path: root/test/test-common.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/test-common.sh')
-rwxr-xr-xtest/test-common.sh29
1 files changed, 11 insertions, 18 deletions
diff --git a/test/test-common.sh b/test/test-common.sh
index af7900e..478694c 100755
--- a/test/test-common.sh
+++ b/test/test-common.sh
@@ -35,6 +35,17 @@ common_before() {
%commit
eot
export GPGKEY="$(gpg --quiet --list-secret-keys --with-colons | awk -F: '/^sec:/{print substr($5,9)}')"
+
+ # Configure libretools
+ export chrootdir="${chrootdir:-$TMPDIR/chroots}"
+
+ mkdir -p "$XDG_CONFIG_HOME"/libretools
+
+ echo "BLACKLIST=https://git.parabola.nu/blacklist.git/plain/blacklist.txt" >"$XDG_CONFIG_HOME"/libretools/libretools.conf
+
+ printf 'CHROOTDIR=%q\n' "${chrootdir}" > "$XDG_CONFIG_HOME"/libretools/chroot.conf
+ printf 'CHROOT=%q\n' default >> "$XDG_CONFIG_HOME"/libretools/chroot.conf
+ echo "CHROOTEXTRAPKG=()" >> "$XDG_CONFIG_HOME"/libretools/chroot.conf
}
common_after() {
@@ -54,24 +65,6 @@ after() {
common_after
}
-chroot_before() {
- mkdir -p "$XDG_CONFIG_HOME"/libretools
-
- echo "BLACKLIST=https://git.parabola.nu/blacklist.git/plain/blacklist.txt" >"$XDG_CONFIG_HOME"/libretools/libretools.conf
-
- printf 'CHROOTDIR=%q\n' "${chrootdir}" > "$XDG_CONFIG_HOME"/libretools/chroot.conf
- printf 'CHROOT=%q\n' default >> "$XDG_CONFIG_HOME"/libretools/chroot.conf
- echo "CHROOTEXTRAPKG=()" >> "$XDG_CONFIG_HOME"/libretools/chroot.conf
-}
-
-setup_chrootdir() {
- export chrootdir="${chrootdir:-$TMPDIR/chroots}"
- before() {
- common_before
- chroot_before
- }
-}
-
# Utility functions for use in test definitions ######################
require() (