pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
wip/mk/tests: install dependencies before setting up the repository
Module Name: pkgsrc-wip
Committed By: Roland Illig <rillig%NetBSD.org@localhost>
Pushed By: rillig
Date: Sun Aug 12 08:26:42 2018 +0000
Changeset: d50ebcdd7ed7dcb711a456f83a50d4681534d172
Modified Files:
mk/tests/test.subr
Log Message:
wip/mk/tests: install dependencies before setting up the repository
This is needed to run the tests successfully on a fresh pkgsrc
installation. Otherwise they fail because "hg: command not found".
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=d50ebcdd7ed7dcb711a456f83a50d4681534d172
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
mk/tests/test.subr | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diffs:
diff --git a/mk/tests/test.subr b/mk/tests/test.subr
index 7ae4a22746..00fe6368ab 100644
--- a/mk/tests/test.subr
+++ b/mk/tests/test.subr
@@ -3,6 +3,7 @@
set -eu
srcdir="${0%/*}"
+testname="${0##*/}"
step() {
echo "" 1>&2
@@ -33,12 +34,12 @@ setup_package() {
test -f "$pkgsrcdir/mk/bsd.pkg.mk" || die "This test must be run from inside pkgsrc"
category=`uuidgen 2>/dev/null || echo "wip-mk-scm-${RANDOM-4}"`
- pkgdir="$pkgsrcdir/$category/mk-scm-tests"
+ pkgdir="$pkgsrcdir/$category/$testname"
rm -rf "$pkgdir"
mkdir -p "$pkgdir"
cp "$srcdir/$1" "$pkgdir/Makefile"
echo "Dummy description." > "$pkgdir/DESCR"
- echo "@comment $""NetBSD""$" > "$pkgdir/PLIST"
+ echo "@comment \$""NetBSD""\$" > "$pkgdir/PLIST"
cd "$pkgdir"
repodir="$pkgdir/files/repo"
@@ -47,6 +48,10 @@ setup_package() {
tmpdir="$pkgdir/tmp"
mkdir -p "$tmpdir"
+ # Install the VCS if necessary; needed by setup_*_repository.
+ package_make depends
+ package_make clean
+
wrkdir=`package_make show-var VARNAME=WRKDIR`
}
Home |
Main Index |
Thread Index |
Old Index