summaryrefslogtreecommitdiff
path: root/tests/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tests')
-rwxr-xr-xtests/tests/build-modes-asplit5
-rwxr-xr-xtests/tests/build-modes-gbp1
-rwxr-xr-xtests/tests/build-modes-gbp-asplit5
-rwxr-xr-xtests/tests/build-modes-sbuild4
-rwxr-xr-xtests/tests/import-nonnative1
-rwxr-xr-xtests/tests/pbuilder42
-rwxr-xr-xtests/tests/push-source1
-rwxr-xr-xtests/tests/push-source-with-changes4
-rwxr-xr-xtests/tests/quilt-gbp-build-modes-sbuild2
-rwxr-xr-xtests/tests/quilt-splitbrains3
-rwxr-xr-xtests/tests/sbuild-gitish3
11 files changed, 52 insertions, 19 deletions
diff --git a/tests/tests/build-modes-asplit b/tests/tests/build-modes-asplit
deleted file mode 100755
index fa3bf8a..0000000
--- a/tests/tests/build-modes-asplit
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-set -e
-. tests/lib
-. $troot/lib-build-modes
-bm-alwayssplit
diff --git a/tests/tests/build-modes-gbp b/tests/tests/build-modes-gbp
index 50a6288..d99b791 100755
--- a/tests/tests/build-modes-gbp
+++ b/tests/tests/build-modes-gbp
@@ -4,6 +4,7 @@ set -e
. $troot/lib-build-modes
t-dependencies git-buildpackage
+t-buildproductsdir-config
quirk-clean-fixup () {
case $cleanmode in
diff --git a/tests/tests/build-modes-gbp-asplit b/tests/tests/build-modes-gbp-asplit
deleted file mode 100755
index fa3bf8a..0000000
--- a/tests/tests/build-modes-gbp-asplit
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-set -e
-. tests/lib
-. $troot/lib-build-modes
-bm-alwayssplit
diff --git a/tests/tests/build-modes-sbuild b/tests/tests/build-modes-sbuild
index 19dcc8a..be2d4c9 100755
--- a/tests/tests/build-modes-sbuild
+++ b/tests/tests/build-modes-sbuild
@@ -6,10 +6,12 @@ set -e
t-dependencies sbuild
t-restrict x-dgit-schroot-build
+t-buildproductsdir-config
+
bm_quirk_after_act=bm-quirk-sbuild-after-act
bm-prep
-act="sbuild -c build --no-arch-all"
+act="sbuild -c $schroot --no-arch-all"
real_act="$act"
bm-guess-e-source-e-targets "$act"
diff --git a/tests/tests/import-nonnative b/tests/tests/import-nonnative
index 3568563..7bb33a9 100755
--- a/tests/tests/import-nonnative
+++ b/tests/tests/import-nonnative
@@ -4,6 +4,7 @@ set -e
. $troot/lib-import-chk
t-tstunt-parsechangelog
+t-buildproductsdir-config
# 1.0 with diff
t-import-chk pari-extra 3-1
diff --git a/tests/tests/pbuilder b/tests/tests/pbuilder
new file mode 100755
index 0000000..2c9dbae
--- /dev/null
+++ b/tests/tests/pbuilder
@@ -0,0 +1,42 @@
+#!/bin/bash
+set -e
+. tests/lib
+
+suitespecs+=' stable'
+
+t-buildproductsdir-config
+
+t-prep-newpackage example 1.0
+
+cd $p
+
+t-commit "make a commit" 1.1 stable
+
+t-tstunt pbuilder
+
+t-expect-fail "dgit: error: you asked for a builder but your debbuildopts didn't ask for any binaries -- is this really what you meant?" \
+t-dgit -v0 --pbuilder="$troot/pretend-pbuilder" pbuilder -S
+
+t-expect-fail "dgit: error: we must build a .dsc to pass to the builder but your debbuiltopts forbids the building of a source package; cannot continue" \
+t-dgit -v0 --pbuilder="$troot/pretend-pbuilder" pbuilder -b
+
+# it would be nice to try passing -g on the end of the following line
+# to confirm it gets massaged into -A, but the example package is
+# RC-buggy in that it doesn't build with -A ..
+t-dgit -v0 --pbuilder="$troot/pretend-pbuilder" pbuilder
+
+t-dgit -wgf push --new
+
+t-pushed-good master stable
+t-pushed-good-check-changes
+
+# check we actually built binaries
+t-push-included example_1.1_all.deb
+
+# this purpose of this is to check that the _source.changes that was
+# merged is the one that dgit made, not something pbuilder made (this
+# works because the -v$v in the above is handled by dgit and not
+# passed on to pbuilder)
+grep -F "example (1.0)" $changes_filename
+
+t-ok
diff --git a/tests/tests/push-source b/tests/tests/push-source
index 9d132e5..f0eafb8 100755
--- a/tests/tests/push-source
+++ b/tests/tests/push-source
@@ -3,6 +3,7 @@ set -e
. tests/lib
t-tstunt-parsechangelog
+t-buildproductsdir-config
t-prep-newpackage example 1.0
diff --git a/tests/tests/push-source-with-changes b/tests/tests/push-source-with-changes
index b9a3906..580ea3a 100755
--- a/tests/tests/push-source-with-changes
+++ b/tests/tests/push-source-with-changes
@@ -2,8 +2,6 @@
set -e
. tests/lib
-arch=$(dpkg-architecture -qDEB_BUILD_ARCH)
-
t-tstunt-parsechangelog
t-prep-newpackage example 1.0
@@ -18,7 +16,7 @@ t-ref-head
t-dgit --dpkg-buildpackage:-d build -F
t-expect-push-fail 'user-specified changes file is not source-only' \
-t-dgit -C ../${p}_1.0_${arch}.changes push-source --new
+t-dgit -C ../${p}_1.0_multi.changes push-source --new
# (2) try pushing a source-only changes file
diff --git a/tests/tests/quilt-gbp-build-modes-sbuild b/tests/tests/quilt-gbp-build-modes-sbuild
index 4c86bfe..ec1d1c7 100755
--- a/tests/tests/quilt-gbp-build-modes-sbuild
+++ b/tests/tests/quilt-gbp-build-modes-sbuild
@@ -7,6 +7,6 @@ t-dependencies sbuild
t-restrict x-dgit-schroot-build
bm-gbp-example-acts \
- 'sbuild -c build --arch-all' \
+ "sbuild -c $schroot --arch-all" \
t-ok
diff --git a/tests/tests/quilt-splitbrains b/tests/tests/quilt-splitbrains
index 9f0ae5f..6886cf8 100755
--- a/tests/tests/quilt-splitbrains
+++ b/tests/tests/quilt-splitbrains
@@ -35,9 +35,6 @@ want-success () {
echo "===== testing tree suitable for --quilt=gbp (only) ====="
-t-expect-fail 'grep: new-upstream-file: No such file or directory' \
-t-dgit --quilt=dpm build-source
-
t-expect-fail 'git tree differs from result of applying' \
t-dgit -wgf --quilt=dpm build-source
diff --git a/tests/tests/sbuild-gitish b/tests/tests/sbuild-gitish
index 6e497b2..7c0a30c 100755
--- a/tests/tests/sbuild-gitish
+++ b/tests/tests/sbuild-gitish
@@ -6,6 +6,7 @@ t-dependencies sbuild man-db
t-restrict x-dgit-schroot-build
t-tstunt-parsechangelog
+t-buildproductsdir-config
t-prep-newpackage example 1.1
@@ -16,7 +17,7 @@ buildrune=$(
next unless m/^ +\%/ .. 0;
next if !m/\S/ .. 0;
s/^ +\%//;
- $fixchr += s/(\s-c\s*)jessie(\s|$)/$1build$2/;
+ $fixchr += s/(\s-c\s*)jessie(\s|$)/$1'"$schroot"'$2/;
print or die $!;
END { $fixchr == 1 or die $fixchr; }
'