From 3d5d7a24d2153604fb4f6acd445bd589148daf5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Laboissi=C3=A8re?= Date: Wed, 27 Nov 2019 12:05:00 -0300 Subject: [PATCH] e/B20autopkgtest: Use autodep8 in autopkgtest hook to check existence of tests The hook script B20autopkgtest fails to detect the existence of unit tests for packages that have no debian/tests/control file but that have autodep8 support. This commit fixes the issue. Closes: #945593 --- examples/B20autopkgtest | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/B20autopkgtest b/examples/B20autopkgtest index 61eff862..ad85e582 100644 --- a/examples/B20autopkgtest +++ b/examples/B20autopkgtest @@ -36,8 +36,11 @@ set -ex cd "$BUILDDIR"/*/debian/.. -if [ ! -f debian/tests/control ]; then - echo "Package does not have autopkgtest support, debian/tests/control is missing" +apt-get --yes install autodep8 + +if [ -z "$(autodep8)" ]; then + echo "Package does not have autopkgtest support. Either file" + echo "debian/tests/control is missing or there is no autodep8 support." exit 0 fi -- GitLab