diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2018-06-02 12:28:14 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2018-06-02 12:28:14 -0400 |
commit | 209a8c565f61c9491b151201c5ac0917d6ff26b7 (patch) | |
tree | bcd5e8c2ece43d625be37c1c56ce981b331fac9d /test | |
parent | c54ef152ed0a55e7739c06bcaaa41edf7aa37a7c (diff) |
librechroot: Properly clean up temporary pacman.conf file
Diffstat (limited to 'test')
-rw-r--r-- | test/librechroot-test.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/librechroot-test.sh b/test/librechroot-test.sh index 42d4803..edf7a4f 100644 --- a/test/librechroot-test.sh +++ b/test/librechroot-test.sh @@ -145,3 +145,16 @@ it_deletes_subvolumes_recursively() { testsudo librechroot -l "$roundup_test_name" delete not test -e "$chrootdir/default/$roundup_test_name" } + +it_cleans_up_TMPDIR() { + require network sudo || return 0 + + local dir="$tmpdir/tmp" + mkdir -- "$dir" + + libremessages msg 'Creating a chroot, may take a few minutes' &>/dev/tty + TMPDIR=$dir testsudo librechroot -l "$roundup_test_name" -A x86_64 make + + # Make sure $dir is now empty + rmdir -- "$dir" +} |