diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2018-10-01 00:58:07 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2018-10-01 20:18:00 -0400 |
commit | eb628addb89229db73557af540f28b951b99f793 (patch) | |
tree | 69d6e9ed7a1cc3e0f19e6c2418c0f647f0f6a6c4 | |
parent | 117dc36e11c774ce4c83d432ce7085e5d36cbdc9 (diff) |
test: libremakepkg: Check that distcc works with long paths [ci-skip]
-rw-r--r-- | test/libremakepkg-test.sh | 18 | ||||
-rw-r--r-- | test/libremakepkg.d/PKGBUILD-distcc | 23 |
2 files changed, 41 insertions, 0 deletions
diff --git a/test/libremakepkg-test.sh b/test/libremakepkg-test.sh index fd86984..36176d3 100644 --- a/test/libremakepkg-test.sh +++ b/test/libremakepkg-test.sh @@ -163,6 +163,24 @@ it_detects_distcc_files() { not globfile libretools-hello-1.0-1-any.pkg.tar.?z } +it_allows_distcc_on_long_chrootpaths() { + # The maximum AF_UNIX socket path is 108 bytes; so let's have + # a chroot name that's guaranteed to be >110 characters. + local chrootname=$roundup_test_name.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + + require network sudo || return 0 + cp libremakepkg.d/PKGBUILD-distcc "$tmpdir/PKGBUILD" + cd "$tmpdir" + + cat >> "$XDG_CONFIG_HOME/libretools/chroot.conf" <<-eot + CHROOTEXTRAPKG+=(distcc-nozeroconf socat) + eot + libremessages msg 'Creating a chroot, may take a few minutes' &>/dev/tty + testsudo librechroot -l "$chrootname" install-name distcc-nozeroconf socat + testsudo libremakepkg -l "$chrootname" + globfile libretools-distcc-1.0-1-any.pkg.tar.?z +} + it_doesnt_symlink_outputs() { require network sudo || return 0 diff --git a/test/libremakepkg.d/PKGBUILD-distcc b/test/libremakepkg.d/PKGBUILD-distcc new file mode 100644 index 0000000..5127ae6 --- /dev/null +++ b/test/libremakepkg.d/PKGBUILD-distcc @@ -0,0 +1,23 @@ +pkgname='libretools-distcc' +pkgver=1.0 +license=('GPL') +url='https://parabola.nu' + +pkgrel=1 +arch=(any) +depends=(sh) + +build() { + cd "$srcdir" + echo '#!/bin/sh' > hello.sh + echo 'echo Hello, world!' >> hello.sh + # I don't like hard-coding in an implementation detail, but + # this is the simplest way to verify that `distcc-tool + # odaemon` started correctly. + [[ -S /socket ]] +} + +package() { + cd "$srcdir" + install -Dm755 hello.sh "$pkgdir"/usr/bin/libretools-hello +} |