Log `runme.sh` execution in integration tests (#79263)

* Log `runme.sh` execution in integration tests

This patch adds `set -x` where it's missing in the integration tests.
It also enables `pipefail` in `runme.sh` scripts that use pipes.

* Add a change note for PR #79263
pull/79274/head
Sviatoslav Sydorenko 2 years ago committed by GitHub
parent 6d9e2bc5e9
commit 6674c43edd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,10 @@
---
trivial:
- >-
integration tests — added command invocation logging via ``set -x``
to ``runme.sh`` scripts where it was missing and improved failing
fast in those scripts that use pipes (via ``set -o pipefail``).
See `PR #79263` https://github.com/ansible/ansible/pull/79263>`__.
...

@ -1,6 +1,6 @@
#!/usr/bin/env bash
set -eu -o pipefail
set -eux -o pipefail
# tests must be executed outside of the ansible source tree
# otherwise ansible-test will test the ansible source instead of the test collection

@ -1,6 +1,6 @@
#!/usr/bin/env bash
set -eu
set -eu -o pipefail
source virtualenv.sh
set +x
unset PYTHONPATH

@ -1,6 +1,6 @@
#!/usr/bin/env bash
set -eu
set -eux
ansible-playbook playbook.yml "$@" > output.log 2>&1 || true

@ -1,6 +1,6 @@
#!/usr/bin/env bash
set -eu
set -eux
ansible-playbook playbook.yml "$@" > output.log 2>&1 || true

@ -1,6 +1,6 @@
#!/usr/bin/env bash
set -eu
set -eu -o pipefail
source virtualenv.sh
set +x

@ -1,6 +1,6 @@
#!/usr/bin/env bash
set -eu
set -eux -o pipefail
cleanup() {
echo "Cleanup"

@ -1,9 +1,6 @@
#!/usr/bin/env bash
set -eu
# Using set -x for this test causes the Shippable console to stop receiving updates and the job to time out for macOS.
# Once that issue is resolved the set -x option can be added above.
set -eux -o pipefail
# Run these using en_US.UTF-8 because list-tasks is a user output function and so it tailors its output to the
# user's locale. For unicode tags, this means replacing non-ascii chars with "?"

@ -1,5 +1,5 @@
#!/usr/bin/env bash
set -eu
set -eux
ANSIBLE_ROLES_PATH=../ ansible-playbook --vault-password-file vault-password runme.yml -i inventory "${@}"

Loading…
Cancel
Save