From 599ee8fbfde3786781d36944caac72353aee99e3 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Wed, 25 Jul 2018 21:05:28 +0800 Subject: dgit: make $need_split_build_invocation always true dgit will always build the source package. One minor consequence is that dgit will usualliy generate *_multi.changes rather than *_$arch.changes, so we need to update the one test that makes the contrary assumption. Bump the dgit major version number as this is quite a significant change in implementation and also a behavioural change. This change makes a lot of code dead. Removing that is left as a task for the future. Signed-off-by: Sean Whitton Signed-off-by: Ian Jackson --- tests/tests/push-source-with-changes | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'tests/tests') 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 -- cgit v1.2.3 From f0b46b0422f6ce3bb7c360ee3717eef95d621526 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 26 Jul 2018 05:00:51 +0100 Subject: test suite: Honour DGIT_SCHROOT_CHROOT to set the schroot to use for the sbuild tests. Signed-off-by: Ian Jackson --- tests/tests/build-modes-sbuild | 2 +- tests/tests/quilt-gbp-build-modes-sbuild | 2 +- tests/tests/sbuild-gitish | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/tests') diff --git a/tests/tests/build-modes-sbuild b/tests/tests/build-modes-sbuild index 19dcc8a..cda0783 100755 --- a/tests/tests/build-modes-sbuild +++ b/tests/tests/build-modes-sbuild @@ -9,7 +9,7 @@ t-restrict x-dgit-schroot-build 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/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/sbuild-gitish b/tests/tests/sbuild-gitish index 6e497b2..da90b6f 100755 --- a/tests/tests/sbuild-gitish +++ b/tests/tests/sbuild-gitish @@ -16,7 +16,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; } ' -- cgit v1.2.3 From 806f6ed1a6d83992c044471a6eb2ba75c1295d7b Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 26 Jul 2018 08:55:32 +0100 Subject: test suite: quilt-splitbrains: Drop non-wgf dpm test of gbp package Soon, dgit push-source will no longer clean the tree. So this test will be of no use. Also, it will fail because the error message changes. Delete it. Signed-off-by: Ian Jackson --- tests/tests/quilt-splitbrains | 3 --- 1 file changed, 3 deletions(-) (limited to 'tests/tests') 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 -- cgit v1.2.3 From 42d2e3ec03b634c5719700c5bcfb27f0f652d74c Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 26 Jul 2018 12:48:42 +0100 Subject: test suite: Drop alwayssplit tests Since dgit: make $need_split_build_invocation always true this option has had no effect, so these tests are redundant. And change the comment in dgit near the option parsing. Signed-off-by: Ian Jackson --- tests/tests/build-modes-asplit | 5 ----- tests/tests/build-modes-gbp-asplit | 5 ----- 2 files changed, 10 deletions(-) delete mode 100755 tests/tests/build-modes-asplit delete mode 100755 tests/tests/build-modes-gbp-asplit (limited to 'tests/tests') 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-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 -- cgit v1.2.3 From 5ef05b436104524c65da4a0753882fdb7d77b009 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 25 Jul 2018 05:34:26 +0100 Subject: test suite: Add a couple of t-buildproductsdir-config Add t-buildproductsdir-config to all build-modes tests and to push-source. This will probably catch almost all of the ../ bugs (#863582). Signed-off-by: Ian Jackson --- tests/tests/build-modes-gbp | 1 + tests/tests/push-source | 1 + 2 files changed, 2 insertions(+) (limited to 'tests/tests') 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/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 -- cgit v1.2.3 From 0fba7acedc2d9e29109451001e53c15a6d81a5d3 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 26 Jul 2018 13:01:55 +0100 Subject: test suite: Add t-buildproductsdir-config to some sbuild tests Signed-off-by: Ian Jackson --- tests/tests/build-modes-sbuild | 2 ++ tests/tests/sbuild-gitish | 1 + 2 files changed, 3 insertions(+) (limited to 'tests/tests') diff --git a/tests/tests/build-modes-sbuild b/tests/tests/build-modes-sbuild index cda0783..be2d4c9 100755 --- a/tests/tests/build-modes-sbuild +++ b/tests/tests/build-modes-sbuild @@ -6,6 +6,8 @@ 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 diff --git a/tests/tests/sbuild-gitish b/tests/tests/sbuild-gitish index da90b6f..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 -- cgit v1.2.3 From e1d8c5971e9506c4bf8cdba37a1b7e69a494260e Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 27 Jul 2018 14:30:13 +0800 Subject: test suite: add stubbed test for pbuilder subcommand pbuilder requires root, but we want to be able to test the subcommand outside of autopkgtest too. Signed-off-by: Sean Whitton --- tests/tests/pbuilder | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100755 tests/tests/pbuilder (limited to 'tests/tests') 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 -- cgit v1.2.3 From 3e30ab8dcb32643d399a6f855334bcefc07df26d Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 29 Jul 2018 05:13:15 +0100 Subject: test suite: Test dgit import-dsc --build-products-dir. Add t-buildproductsdir-config to import-nonnative, which will do as a test I think. Signed-off-by: Ian Jackson --- tests/tests/import-nonnative | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/tests') 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 -- cgit v1.2.3