summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-06-04 21:57:25 -0600
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-06-05 20:06:25 -0600
commit695b9b8af8e2629d460d877abab4bdf216c71df2 (patch)
tree17499f3f1c583612e714fd2e9bbe22241bbd7313 /test
parentbcf060fec41789af48664605fd1892f3ca477f4c (diff)
fix the tests to work when libretools isn't installed
Diffstat (limited to 'test')
-rw-r--r--test/librechroot-test.sh2
-rw-r--r--test/libremakepkg-test.sh5
-rw-r--r--test/pkgbuild-check-nonfree-test.sh4
3 files changed, 10 insertions, 1 deletions
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