From 695b9b8af8e2629d460d877abab4bdf216c71df2 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 4 Jun 2013 21:57:25 -0600 Subject: fix the tests to work when libretools isn't installed --- test/librechroot-test.sh | 2 ++ test/libremakepkg-test.sh | 5 ++++- test/pkgbuild-check-nonfree-test.sh | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/librechroot-test.sh b/test/librechroot-test.sh index 91349c2..8c9d690 100644 --- a/test/librechroot-test.sh +++ b/test/librechroot-test.sh @@ -6,6 +6,7 @@ before() { tmpdir=$(mktemp -d --tmpdir test-librechroot.XXXXXXXXXXXX) mkdir -p "$XDG_CONFIG_HOME"/libretools echo "CHROOTDIR='$tmpdir'" > "$XDG_CONFIG_HOME"/libretools/chroot.conf + echo "CHROOT='default'" >> "$XDG_CONFIG_HOME"/libretools/chroot.conf stat=0 } @@ -14,6 +15,7 @@ after() { } it_creates_repo_for_new_chroots() { + libremessages msg 'Creating a chroot, may take a few minutes' &>/dev/tty sudo -EH librechroot run test -r /repo/repo.db } diff --git a/test/libremakepkg-test.sh b/test/libremakepkg-test.sh index 0cf3788..9e54fb6 100644 --- a/test/libremakepkg-test.sh +++ b/test/libremakepkg-test.sh @@ -6,6 +6,7 @@ before() { tmpdir=$(mktemp -d --tmpdir test-libremakepkg.XXXXXXXXXXXX) 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 } @@ -17,7 +18,9 @@ it_builds_a_trivial_package() { cp libremakepkg.d/PKGBUILD-hello "$tmpdir/PKGBUILD" cd "$tmpdir" - sudo -EH libremakepkg &>/dev/null + libremessages msg 'Creating a chroot, may take a few minutes' &>/dev/tty + sudo -EH libremakepkg + [[ -f $(echo libretools-hello-1.0-1-any.pkg.tar.?z) ]] } diff --git a/test/pkgbuild-check-nonfree-test.sh b/test/pkgbuild-check-nonfree-test.sh index e9c37bf..86769c4 100644 --- a/test/pkgbuild-check-nonfree-test.sh +++ b/test/pkgbuild-check-nonfree-test.sh @@ -8,6 +8,10 @@ describe $pcn before() { tmpdir=$(mktemp -d --tmpdir test-pkgbuild-check-nonfree.XXXXXXXXXXXX) stat=0 + + mkdir -p $XDG_CONFIG_HOME/libretools + echo "BLACKLIST='phony://example.com'" >$XDG_CONFIG_HOME/libretools/libretools.conf + local blacklist=$XDG_CACHE_HOME/libretools/blacklist.txt mkdir -p "${blacklist%/*}" echo 'linux:linux-libre:nonfree blobs and firmwares' >$blacklist -- cgit v1.2.2