Tim Andersson has proposed merging ~andersson123/+git/autodep8:update-to-0.29 into ~ubuntu-release/+git/autodep8:master.
Requested reviews: Ubuntu Release Team (ubuntu-release) For more details, see: https://code.launchpad.net/~andersson123/+git/autodep8/+merge/484161 -- Your team Canonical's Ubuntu QA is subscribed to branch ~ubuntu-release/+git/autodep8:master.
diff --git a/debian/changelog b/debian/changelog index 20bc526..7cff8ae 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,35 @@ +autodep8 (0.29) unstable; urgency=medium + + [ Jérôme Charaoui ] + * Add support for testing Puppet modules + + [ Athos Ribeiro ] + * Add support for testing PHP modules using phpunit + + [ Simon McVittie ] + * Merge NMU. Thanks to Michael R. Crusoe + * d/changelog: Document additional changes that were (perhaps + unintentionally?) included in the NMU + + [ Antonio Terceiro ] + * dkms: add test dependency on dctrl-tools + + [ Paul Gevers ] + * perl: use @recommends instead of needs-recommeds + + -- Antonio Terceiro <terce...@debian.org> Tue, 08 Apr 2025 16:42:20 -0300 + autodep8 (0.28+nmu1) unstable; urgency=medium * Non-maintainer upload. + + [ Andreas Beckmann ] + * dkms: generate Depends: openssl for signing modules (Closes: #1029180) + + [ Olivier Gayot ] + * Fix accidental use of global variable instead of local variable + + [ Michael R. Crusoe ] * R packages: don't match packages with unrequested suffixes -- Michael R. Crusoe <cru...@debian.org> Wed, 17 Jul 2024 17:09:01 +0200 diff --git a/debian/control b/debian/control index 060a9a4..6a235f4 100644 --- a/debian/control +++ b/debian/control @@ -26,6 +26,8 @@ Description: DEP-8 test control file generator Currently supported packages types: - Ruby packages using gem2deb/gem2deb-test-runner - Perl packages + - PHP packages using phpunit + - Puppet modules - Python packages - Python packages using pybuild - NodeJS packages diff --git a/examples.in b/examples.in index 0b21b6c..6952a82 100644 --- a/examples.in +++ b/examples.in @@ -1,12 +1,14 @@ -# type example package -# ---- --------------- -dkms acpi-call -elpa emacs-which-key -go prometheus -nodejs node-abbrev -octave octave-signal -perl libtest-most-perl -pybuild python-ofxclient -python python-flaky -r r-cran-evaluate -ruby ruby-sqlite3 +# type example package +# ----------- --------------- +dkms acpi-call +elpa emacs-which-key +go prometheus +nodejs node-abbrev +octave octave-signal +perl libtest-most-perl +php php-composer-semver +puppet_module puppet-module-puppetlabs-mysql +pybuild python-ofxclient +python python-flaky +r r-cran-evaluate +ruby ruby-sqlite3 diff --git a/examples.md b/examples.md index 21b9cdd..a88c72e 100644 --- a/examples.md +++ b/examples.md @@ -49,6 +49,20 @@ Restrictions: needs-recommends Features: test-name=autodep8-perl-recommends +## php (php-composer-semver) + + Test-Command: phpunit-autopkgtest + Depends: @, phpunit, pkg-php-tools, @builddeps@, + Restrictions: allow-stderr, skippable, + Features: test-name=phpunit-autopkgtest + +## puppet_module (puppet-module-puppetlabs-mysql) + + Test-Command: /usr/bin/dh_puppet_module_autopkgtest debian/tests/module_test.pp + Depends: @, dh-puppet, puppet-agent, + Restrictions: needs-root, isolation-container, + Features: test-name=dh-puppet-module-autopkgtest + ## pybuild (python-ofxclient) Test-Command: pybuild-autopkgtest diff --git a/support/dkms/generate b/support/dkms/generate index 01a1911..e167c05 100755 --- a/support/dkms/generate +++ b/support/dkms/generate @@ -3,7 +3,7 @@ cat <<EOF Test-Command: /usr/lib/dkms/dkms-autopkgtest Restrictions: needs-root, breaks-testbed, allow-stderr, superficial, ${pkg_dkms_extra_restrictions:-} -Depends: dkms, openssl, linux-doc, ${pkg_dkms_extra_depends:-} +Depends: dkms, openssl, linux-doc, dctrl-tools, ${pkg_dkms_extra_depends:-} Features: test-name=dkms-autopkgtest EOF diff --git a/support/perl/generate b/support/perl/generate index 8ba8a58..000ffa2 100755 --- a/support/perl/generate +++ b/support/perl/generate @@ -20,8 +20,8 @@ Features: test-name=autodep8-perl ${extra_arch} Test-Command: /usr/share/pkg-perl-autopkgtest/runner runtime-deps-and-recommends -Depends: @, pkg-perl-autopkgtest, ${pkg_perl_extra_depends:-} -Restrictions: needs-recommends, skippable, superficial, ${pkg_perl_extra_restrictions:-} +Depends: @, @recommends@, pkg-perl-autopkgtest, ${pkg_perl_extra_depends:-} +Restrictions: skippable, superficial, ${pkg_perl_extra_restrictions:-} Features: test-name=autodep8-perl-recommends ${extra_arch} EOF diff --git a/support/php/detect b/support/php/detect new file mode 100755 index 0000000..1c4efba --- /dev/null +++ b/support/php/detect @@ -0,0 +1,3 @@ +#!/bin/sh + +false diff --git a/support/php/generate b/support/php/generate new file mode 100755 index 0000000..f195cea --- /dev/null +++ b/support/php/generate @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e + +cat <<EOF +Test-Command: phpunit-autopkgtest +Depends: @, phpunit, pkg-php-tools, @builddeps@, ${pkg_php_extra_depends:-} +Restrictions: allow-stderr, skippable, ${pkg_php_extra_restrictions:-} +Features: test-name=phpunit-autopkgtest +EOF + +if [ x"${pkg_php_architecture:-}" != x ]; then + echo Architecture: "${pkg_php_architecture}" +fi diff --git a/support/puppet_module/detect b/support/puppet_module/detect new file mode 100755 index 0000000..5794474 --- /dev/null +++ b/support/puppet_module/detect @@ -0,0 +1,3 @@ +#!/bin/sh + +grep-dctrl --quiet -F Source -r '^puppet-module-.*$' debian/control && test -f debian/tests/module_test.pp diff --git a/support/puppet_module/generate b/support/puppet_module/generate new file mode 100755 index 0000000..b8c02f8 --- /dev/null +++ b/support/puppet_module/generate @@ -0,0 +1,12 @@ +#!/bin/sh + +cat <<EOF +Test-Command: $(env | grep pkg_puppet_module | tr '$\n' ' ') /usr/bin/dh_puppet_module_autopkgtest debian/tests/module_test.pp +Depends: @, dh-puppet, puppet-agent, ${pkg_puppet_module_extra_depends:-} +Restrictions: needs-root, isolation-container, ${pkg_puppet_module_extra_restrictions:-} +Features: test-name=dh-puppet-module-autopkgtest +EOF + +if [ x"${pkg_puppet_module_architecture:-}" != x ]; then + echo "Architecture: ${pkg_puppet_module_architecture}" +fi diff --git a/test/perl_test.sh b/test/perl_test.sh index d9bf34f..56ca181 100644 --- a/test/perl_test.sh +++ b/test/perl_test.sh @@ -38,7 +38,7 @@ Recommends: perl-bar Package: perl-foo-2 Recommends: perl-baz' check_run autodep8 - assertTrue 'No Recommends in control' 'grep ^Restrictions: stdout | grep --quiet needs-recommends' + assertTrue 'No @recommends@ in control' 'grep ^Depends: stdout | grep --quiet recommends' } . shunit2 diff --git a/test/php_test.sh b/test/php_test.sh new file mode 100644 index 0000000..b5f4889 --- /dev/null +++ b/test/php_test.sh @@ -0,0 +1,31 @@ +. $(dirname $0)/helper.sh + +test_php() { + has 'debian/control' 'Source: php-foo\n\nPackage:php-foo\nTestsuite: autopkgtest-pkg-php' + check_run autodep8 + assertTrue 'runs phpunit-autopkgtest' 'grep "Test-Command: phpunit-autopkgtest" stdout' + assertTrue 'sets test name' 'grep "Features:.*test-name=" stdout' +} + +test_extra_depends() { + has 'debian/control' 'Source: php-foo\n\nPackage:php-foo\nTestsuite: autopkgtest-pkg-php' + has 'debian/tests/autopkgtest-pkg-php.conf' 'extra_depends=foobar' + check_run autodep8 + assertTrue 'uses extra depends' 'grep "Depends:.*, foobar" stdout' +} + +test_extra_restrictions() { + has 'debian/control' 'Source: php-foo\n\nPackage:php-foo\nTestsuite: autopkgtest-pkg-php' + has 'debian/tests/autopkgtest-pkg-php.conf' 'extra_restrictions=isolation-container' + check_run autodep8 + assertTrue 'uses extra depends' 'grep "Restrictions:.*, isolation-container" stdout' +} + +test_architecture() { + has 'debian/control' 'Source: php-foo\n\nPackage:php-foo\nTestsuite: autopkgtest-pkg-php' + has 'debian/tests/autopkgtest-pkg-php.conf' 'architecture=amd64' + check_run autodep8 + assertTrue 'uses architecture' 'grep "^Architecture: amd64$" stdout' +} + +. shunit2 diff --git a/test/puppet_module_test.sh b/test/puppet_module_test.sh new file mode 100644 index 0000000..8868177 --- /dev/null +++ b/test/puppet_module_test.sh @@ -0,0 +1,23 @@ +. $(dirname $0)/helper.sh + +test_puppet_module_detection() { + has debian/control 'Source: puppet-module-puppetlabs-mysql' + has debian/tests/module_test.pp + check_run autodep8 +} + +test_puppet_module_missing_test_manifest() { + has debian/control 'Source: puppet-module-puppetlabs-mysql' + run autodep8 + assertEquals 1 "$exitstatus" +} + +test_puppet_module_test_command_environment() { + has debian/control 'Source: puppet-module-puppetlabs-mysql' + has debian/tests/module_test.pp + has debian/tests/autopkgtest-pkg-puppet_module.conf 'foo=bar' + check_run autodep8 + assertTrue "test passes autodep8 config environment to runner script\n$(grep Test-Command: stdout)\n" "grep -q 'Test-Command: pkg_puppet_module_foo=bar' stdout" +} + +. shunit2
-- Mailing list: https://launchpad.net/~canonical-ubuntu-qa Post to : canonical-ubuntu-qa@lists.launchpad.net Unsubscribe : https://launchpad.net/~canonical-ubuntu-qa More help : https://help.launchpad.net/ListHelp