From fd8f387167425d0c9da7bce0ffc460a57d0ceced Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 29 Jun 2015 02:46:24 +0100 Subject: Detect and bomb out on vendor-specific `3.0 (quilt)' patch series. --- tests/tests/distropatches-reject | 83 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100755 tests/tests/distropatches-reject (limited to 'tests/tests/distropatches-reject') diff --git a/tests/tests/distropatches-reject b/tests/tests/distropatches-reject new file mode 100755 index 0000000..c702c37 --- /dev/null +++ b/tests/tests/distropatches-reject @@ -0,0 +1,83 @@ +#!/bin/bash +set -e +. tests/lib + +p=ruby-rails-3.2 + +t-archive ruby-rails-3.2 3.2.6-1 +t-git-none + +cp $troot/pkg-srcs/${p}_3.2.6.orig.tar.gz . +t-worktree test +cd $p + +t-dgit --quilt=smash quilt-fixup + +build () { + t-dgit -wg --dpkg-buildpackage:-d build +} + +expect-fail-distro-series () { + local why=$1; shift + t-expect-fail \ + E:"Found active distro-specific series file.*(.*$why.*)" \ + "$@" +} + +mkdir -p debian/patches + +cat >debian/patches/boo <<'END' +Description: add boo +Author: Ian Jackson + +--- + +--- a/boo ++++ b/boo +@@ -0,0 +1 @@ ++content +END + +echo boo >debian/patches/test-dummy.series + +git add debian/patches/boo +git add debian/patches/test-dummy.series +t-commit 'Add boo (on test-dummy)' 3.2.6-2 + +expect-fail-distro-series 'distro being accessed' \ +build + +defaultvendor=$(perl -we ' + use Dpkg::Vendor; + print lc Dpkg::Vendor::get_current_vendor +') +git mv debian/patches/test-dummy.series \ + debian/patches/$defaultvendor.series +t-commit 'Move boo (to default vendor)' 3.2.6-3 + +expect-fail-distro-series 'current vendor' \ +build + +git mv debian/patches/$defaultvendor.series \ + debian/patches/test-dummy-aside.series +t-commit 'Move boo (to test-dummy-aside)' 3.2.6-4 + +build + +DEB_VENDOR=test-dummy-aside \ +expect-fail-distro-series DEB_VENDOR \ +t-dgit push + +t-dgit push + +cd .. +perl -i~ -pe 's/^Dgit:.*\n//' incoming/${p}_${v}.dsc +t-archive-process-incoming sid + +rm -rf $p + +DEB_VENDOR=test-dummy-aside \ +expect-fail-distro-series DEB_VENDOR \ +t-dgit clone $p + +echo done. -- cgit v1.2.3