diff options
Diffstat (limited to '')
-rw-r--r-- | debian/changelog | 8 | ||||
-rwxr-xr-x | debian/tests/ansible-test-integration.py | 33 | ||||
-rw-r--r-- | debian/tests/control | 22 |
3 files changed, 39 insertions, 24 deletions
diff --git a/debian/changelog b/debian/changelog index 1f6fe68..979afbc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +ansible-core (2.17.3-1) unstable; urgency=medium + + * New upstream version 2.17.3 + * Disable some tests on CI that time out + * Updates to autopkgtests + + -- Lee Garrett <debian@rocketjump.eu> Tue, 13 Aug 2024 14:14:20 +0200 + ansible-core (2.17.2-1~progress7.99u1) graograman-backports; urgency=medium * Uploading to graograman-backports, remaining changes: diff --git a/debian/tests/ansible-test-integration.py b/debian/tests/ansible-test-integration.py index c9b657f..2d68b34 100755 --- a/debian/tests/ansible-test-integration.py +++ b/debian/tests/ansible-test-integration.py @@ -1,7 +1,6 @@ #!/usr/bin/python3 import argparse -import glob import os import subprocess import sys @@ -31,8 +30,8 @@ def runprog (name, progargs, exit_on_failure=True): log(1, "#### STDERR ####") log(1, proc.stderr) log(0,"#"*72) - if exit_on_failure == True: - exit(proc.returncode) + if exit_on_failure: + sys.exit(proc.returncode) return proc def locale_debug(name): @@ -43,7 +42,11 @@ def locale_debug(name): prog = runprog('cat /etc/default/locale', ['cat', '/etc/default/locale']) log(2, prog.stdout, prog.stderr) # grep will exit 1 when it doesn't return anything, so don't fail on it. - prog = runprog('grep -v -P \'^#|^$\' /etc/locale.gen', ['grep', '-v', '-P', '^#|^$', '/etc/locale.gen'], exit_on_failure=False) + prog = runprog( + 'grep -v -P \'^#|^$\' /etc/locale.gen', + ['grep', '-v', '-P', '^#|^$', '/etc/locale.gen'], + exit_on_failure=False, + ) log(2, prog.stdout, prog.stderr) parser = argparse.ArgumentParser( @@ -112,7 +115,8 @@ parser.add_argument( '--verbose', '-v', action='count', default=1, - help='verbosity between 0 and 5. 0 will only emit errors. 1=INFO. More for increasing levels of debug info. Defaults to 1.', + help='verbosity between 0 and 5. 0 will only emit errors. 1=INFO. \ + More for increasing levels of debug info. Defaults to 1.', ) args = parser.parse_args() @@ -121,7 +125,7 @@ locale_debug('locale before setting os.environ:') os.environ['LANG'] = 'en_US.UTF-8' locale_debug('locale after setting os.environ:') -if args.setup == True: +if args.setup is True: proc = runprog('testbed-setup.sh', ['sudo', './debian/tests/testbed-setup.sh']) log(2,"#### STDOUT ####") log(2, proc.stdout) @@ -221,32 +225,32 @@ default_targets = list( targets = [] skipped = [] -if args.default_tests == True: +if args.default_tests is True: targets.extend(default_targets) else: skipped.extend(default_targets) -if args.requires_root == True: +if args.requires_root is True: targets.extend(integration_requires_root) else: skipped.extend(integration_requires_root) -if args.requires_ssh == True: +if args.requires_ssh is True: targets.extend(integration_requires_ssh) else: skipped.extend(integration_requires_ssh) -if args.requires_apt_mark_manual == True: +if args.requires_apt_mark_manual is True: targets.extend(integration_requires_apt_mark_manual) else: skipped.extend(integration_requires_apt_mark_manual) -if args.fails_on_pip == True: +if args.fails_on_pip is True: targets.extend(integration_fails_on_pip) else: skipped.extend(integration_fails_on_pip) -if args.failing == True: +if args.failing is True: targets.extend(integration_failing) else: skipped.extend(integration_failing) @@ -256,7 +260,7 @@ skipped.sort() for i in targets: - if args.dry_run == True: + if args.dry_run is True: log(1, 'Would run ansible-test in', i) skipped.append(i) continue @@ -277,7 +281,6 @@ for i in targets: i ]) - if proc.returncode != 0: failed_tests.append(i) overall_test_rc = proc.returncode @@ -306,4 +309,4 @@ log(2, '### skipped test list:') for i in skipped: log(2, i) -exit(overall_test_rc) +sys.exit(overall_test_rc) diff --git a/debian/tests/control b/debian/tests/control index d9f0582..777e82e 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -17,6 +17,7 @@ Depends: @, python3-winrm, python3-yaml +# integration tests that can run as unpriviliged user Tests: ansible-test-integration.py Depends: @, #bsdextrautils, @@ -24,12 +25,12 @@ Depends: @, file, # stat git, # used by most tests #gnupg, - gzip, # git - iptables, # iptables + gzip, # integration test git + iptables, # integration test iptables #iproute2, locales, #procps, - #python3-apt, + python3-apt, # needed for checking if packages are installed #python3-cryptography, python3-distlib, # ansible-galaxy-collection-cli #python3-jinja2, @@ -50,7 +51,6 @@ Depends: @, python3-yaml, # ansible-test-units-forked #pwsh, # ansible-test-sanity-validate-modules, see RFP bug https://bugs.debian.org/834756, #rsync, - shellcheck, sudo, # needed for testbed-setup.sh tar, # integration test git unzip, # integration test git @@ -60,20 +60,21 @@ Restrictions: needs-internet, # used for ansible-galaxy and pip tests needs-sudo, # used to call testbed-setup.sh +# integration tests that require root Test-Command: ./debian/tests/ansible-test-integration.py --no-default-tests --requires-root --no-requires-apt-mark-manual -Features: test-name=ansible-test-integration-flaky +Features: test-name=ansible-test-integration-requires-root Depends: @, #bsdextrautils, debconf-utils, # debconf file, # stat git, # used by most tests gnupg, # integration test apt-key - gzip, # git - iptables, # iptables + gzip, # integration test git + iptables, # integration test iptables #iproute2, locales, #procps, - #python3-apt, + python3-apt, # needed for checking if packages are installed #python3-cryptography, python3-distlib, # ansible-galaxy-collection-cli #python3-jinja2, @@ -94,7 +95,6 @@ Depends: @, python3-yaml, # ansible-test-units-forked #pwsh, # ansible-test-sanity-validate-modules, see RFP bug https://bugs.debian.org/834756, #rsync, - shellcheck, sudo, # needed for testbed-setup.sh tar, # integration test git unzip, # integration test git @@ -103,3 +103,7 @@ Restrictions: allow-stderr, # lots of STDERR output needs-internet, # used for ansible-galaxy and pip tests needs-root, # we're running tests requiring root + # don't run broken tests on CI, as that makes autopkgtest time out + # Run `autopkgtest --ignore-restrictions disabled-on-ci [...]` to run locally. + # Thanks elbrus for the tip! + disabled-on-ci, |