Skip to content

Commit

Permalink
[2.14] Log runme.sh execution in integration tests (#79282)
Browse files Browse the repository at this point in the history
* 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

(cherry picked from commit 6674c43)

* Delete a bad PR #79263 change note

(cherry picked from commit 9cfb3f7)
  • Loading branch information
webknjaz committed Nov 4, 2022
1 parent edbd88d commit 0f3a1d3
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion test/integration/targets/ansible-test-git/runme.sh
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/integration/targets/entry_points/runme.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

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

set -eu
set -eux

ansible-playbook playbook.yml "$@" > output.log 2>&1 || true

Expand Down
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

set -eu
set -eux

ansible-playbook playbook.yml "$@" > output.log 2>&1 || true

Expand Down
2 changes: 1 addition & 1 deletion test/integration/targets/pyyaml/runme.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

set -eu
set -eu -o pipefail
source virtualenv.sh
set +x

Expand Down
2 changes: 1 addition & 1 deletion test/integration/targets/subversion/runme.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

set -eu
set -eux -o pipefail

cleanup() {
echo "Cleanup"
Expand Down
5 changes: 1 addition & 4 deletions test/integration/targets/tags/runme.sh
@@ -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 "?"
Expand Down
2 changes: 1 addition & 1 deletion test/integration/targets/test_core/runme.sh
@@ -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 "${@}"

0 comments on commit 0f3a1d3

Please sign in to comment.