From 232e6395c3b77043bb499542b8cffe66833d49bc Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 12 May 2017 15:56:41 -0400 Subject: test: libremakepkg: add (failing) check for $startdir symlinks --- test/libremakepkg-test.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'test') 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) ]] +} -- cgit v1.2.2