This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch master in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=e065f0206ebf540c002bd94d9340867cb3af542f commit e065f0206ebf540c002bd94d9340867cb3af542f Author: Guillem Jover <[email protected]> AuthorDate: Mon Mar 23 02:54:00 2020 +0100 dpkg-source: Check that debian/tests/control has the required fields This tests control file must have either a Tests field or a Test-Command field. So we check for this condition and error out otherwise. Prompted-by: Felix Lechner <[email protected]> --- debian/changelog | 2 ++ scripts/dpkg-source.pl | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 29e3870fb..20504924a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,8 @@ dpkg (1.20.1) UNRELEASED; urgency=medium options with arguments, such as “parallel” as DEB_BUILD_OPTION_PARALLEL. * dpkg-genchanges: Handle empty Date fields from parsed debian/changelog. Based on a patch by Baptiste BEAUPLAT <[email protected]>. Closes: #956321 + * dpkg-source: Check that debian/tests/control has the required fields. + Prompted by Felix Lechner <[email protected]>. * Perl modules: - Dpkg: Add a LICENSE section to the POD. - Dpkg::Source::Package: Add new get_upstream_signing_key() method. diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl index c2764af07..4dc47ab03 100755 --- a/scripts/dpkg-source.pl +++ b/scripts/dpkg-source.pl @@ -525,6 +525,11 @@ sub set_testsuite_triggers_field return if $fields->{'Testsuite-Triggers'}; foreach my $test ($tests->get()) { + if (not exists $test->{Tests} and not exists $test->{'Test-Command'}) { + error(g_('test control %s is missing %s or %s field'), + 'debian/tests/control', 'Tests', 'Test-Command'); + } + next unless $test->{Depends}; my $deps = deps_parse($test->{Depends}, use_arch => 0, tests_dep => 1); -- Dpkg.Org's dpkg

