diff options
-rw-r--r-- | test/libremakepkg-test.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/libremakepkg-test.sh b/test/libremakepkg-test.sh index 3609cb6..54816dd 100644 --- a/test/libremakepkg-test.sh +++ b/test/libremakepkg-test.sh @@ -154,3 +154,26 @@ it_detects_distcc_files() { [[ $stat != 0 ]] not [[ -f $(echo libretools-hello-1.0-1-any.pkg.tar.?z) ]] } + +it_symlinks_outputs() { + require network sudo || return 0 + + echo "WORKDIR='$tmpdir/workdir'" > $XDG_CONFIG_HOME/libretools/libretools.conf + mkdir -p $XDG_CONFIG_HOME/pacman + { + printf 'PKGDEST=%q\n' "$tmpdir/workdir/pkgdest" + printf 'SRCPKGDEST=%q\n' "$tmpdir/workdir/srcpkgdest" + } >$XDG_CONFIG_HOME/pacman/makepkg.conf + trap 'rm -f -- "$XDG_CONFIG_HOME/libretools/libretools.conf" "$XDG_CONFIG_HOME/pacman/makepkg.conf"' RETURN + + cp libremakepkg.d/PKGBUILD-hello "$tmpdir/PKGBUILD" + cd "$tmpdir" + + libremessages msg 'Creating a chroot, may take a few minutes' &>/dev/tty + testsudo libremakepkg -l "$roundup_test_name" + + [[ -f $(echo libretools-hello-1.0-1-any.pkg.tar.?z) ]] + [[ -L $(echo libretools-hello-1.0-1-any.pkg.tar.?z) ]] + [[ -f $(echo libretools-hello-1.0-1-any.src.tar.?z) ]] + [[ -L $(echo libretools-hello-1.0-1-any.src.tar.?z) ]] +} |