diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-06-04 22:02:21 -0600 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-06-05 20:06:25 -0600 |
commit | a329839346a3c2c9591985b70841858dd575846f (patch) | |
tree | b7cbde15e7e46d42726058b9e318ce6a8e85c29c /test/libremakepkg-test.sh | |
parent | 695b9b8af8e2629d460d877abab4bdf216c71df2 (diff) |
add a system to skip tests that require networking or sudo.
Diffstat (limited to 'test/libremakepkg-test.sh')
-rw-r--r-- | test/libremakepkg-test.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/libremakepkg-test.sh b/test/libremakepkg-test.sh index 9e54fb6..94249a9 100644 --- a/test/libremakepkg-test.sh +++ b/test/libremakepkg-test.sh @@ -2,19 +2,22 @@ describe libremakepkg +. ./test-common.sh + before() { - tmpdir=$(mktemp -d --tmpdir test-libremakepkg.XXXXXXXXXXXX) + _before libremakepkg + mkdir -p "$XDG_CONFIG_HOME"/libretools echo "CHROOTDIR='$tmpdir/chrootdir'" > "$XDG_CONFIG_HOME"/libretools/chroot.conf echo "CHROOT='default'" >> "$XDG_CONFIG_HOME"/libretools/chroot.conf - stat=0 } after() { - rm -rf -- "$tmpdir" "$XDG_CONFIG_HOME" + _after } it_builds_a_trivial_package() { + require network sudo || return 0 cp libremakepkg.d/PKGBUILD-hello "$tmpdir/PKGBUILD" cd "$tmpdir" |