summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/libremakepkg-test.sh9
-rw-r--r--test/libremakepkg.d/PKGBUILD-netbuild1
-rw-r--r--test/libremakepkg.d/PKGBUILD-netprepare17
3 files changed, 27 insertions, 0 deletions
diff --git a/test/libremakepkg-test.sh b/test/libremakepkg-test.sh
index 811c8ed..4d8a7c5 100644
--- a/test/libremakepkg-test.sh
+++ b/test/libremakepkg-test.sh
@@ -33,6 +33,15 @@ it_builds_a_trivial_package() {
[[ -f $(echo libretools-hello-1.0-1-any.pkg.tar.?z) ]]
}
+it_enables_networking_during_prepare() {
+ require network sudo || return 0
+ cp libremakepkg.d/PKGBUILD-netprepare "$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-netprepare-1.0-1-any.pkg.tar.?z) ]]
+}
it_disables_networking_during_build() {
require network sudo || return 0
diff --git a/test/libremakepkg.d/PKGBUILD-netbuild b/test/libremakepkg.d/PKGBUILD-netbuild
index c1335a6..7be896b 100644
--- a/test/libremakepkg.d/PKGBUILD-netbuild
+++ b/test/libremakepkg.d/PKGBUILD-netbuild
@@ -7,6 +7,7 @@ pkgrel=1
arch=(any)
build() {
+ cd "$srcdir"
curl https://repo.parabolagnulinux.org/ > index.html
}
diff --git a/test/libremakepkg.d/PKGBUILD-netprepare b/test/libremakepkg.d/PKGBUILD-netprepare
new file mode 100644
index 0000000..90f3e82
--- /dev/null
+++ b/test/libremakepkg.d/PKGBUILD-netprepare
@@ -0,0 +1,17 @@
+pkgname='libretools-netprepare'
+pkgver=1.0
+license=('GPL')
+url='https://parabolagnulinux.org'
+
+pkgrel=1
+arch=(any)
+
+prepare() {
+ cd "$srcdir"
+ curl https://repo.parabolagnulinux.org/ > index.html
+}
+
+package() {
+ cd "$srcdir"
+ install -Dm644 index.html "$pkgdir"/usr/share/$pkgname/index.html
+}