File: runme.sh

package info (click to toggle)
ansible-core 2.19.0~beta6-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 32,628 kB
  • sloc: python: 180,313; cs: 4,929; sh: 4,601; xml: 34; makefile: 21
file content (24 lines) | stat: -rwxr-xr-x 707 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env bash

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
# the temporary directory provided by ansible-test resides within the ansible source tree
tmp_dir=$(mktemp -d)

trap 'rm -rf "${tmp_dir}"' EXIT

export TEST_DIR
export WORK_DIR

TEST_DIR="$PWD"

for test in collection-tests/*.sh; do
  WORK_DIR="${tmp_dir}/$(basename "${test}" ".sh")"
  mkdir "${WORK_DIR}"
  echo "**********************************************************************"
  echo "TEST: ${test}: STARTING"
  "${test}" "${@}" || (echo "TEST: ${test}: FAILED" && exit 1)
  echo "TEST: ${test}: PASSED"
done