diff options
Diffstat (limited to 'test/test-common.sh')
-rwxr-xr-x | test/test-common.sh | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/test/test-common.sh b/test/test-common.sh index 45adb8b..bd66fc7 100755 --- a/test/test-common.sh +++ b/test/test-common.sh @@ -43,10 +43,7 @@ after() { } setup_chrootdir() { - if [[ -z "$chrootdir" ]]; then - export chrootdir="$(mktemp -d --tmpdir "test-chrootdir.XXXXXXXXXXXX")" - trap "$(printf '_cleanup_chrootdir %q' "$chrootdir")" EXIT - fi + export chrootdir="${chrootdir:-$TMPDIR/chroots}" _common_before() { mkdir -p "$XDG_CONFIG_HOME"/libretools @@ -58,20 +55,6 @@ setup_chrootdir() { } } -_cleanup_chrootdir() ( - chrootdir=$1 - shopt -s nullglob - if [[ $SUDO ]]; then - if [[ "$(stat -f -c %T "$chrootdir")" == btrfs ]]; then - sudo find "$chrootdir" -depth -inum 256 -exec \ - btrfs subvolume delete {} \; &>/dev/null - fi - sudo rm -rf -- "$chrootdir" - else - rm -rf -- "$chrootdir" - fi -) - require() ( set +x local missing=() |