diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:21 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:21 +0000 |
commit | 8a754e0858d922e955e71b253c139e071ecec432 (patch) | |
tree | 527d16e74bfd1840c85efd675fdecad056c54107 /test/integration/targets/entry_points | |
parent | Initial commit. (diff) | |
download | ansible-core-upstream/2.14.3.tar.xz ansible-core-upstream/2.14.3.zip |
Adding upstream version 2.14.3.upstream/2.14.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | test/integration/targets/entry_points/aliases | 2 | ||||
-rwxr-xr-x | test/integration/targets/entry_points/runme.sh | 31 |
2 files changed, 33 insertions, 0 deletions
diff --git a/test/integration/targets/entry_points/aliases b/test/integration/targets/entry_points/aliases new file mode 100644 index 0000000..9d96756 --- /dev/null +++ b/test/integration/targets/entry_points/aliases @@ -0,0 +1,2 @@ +context/controller +shippable/posix/group4 diff --git a/test/integration/targets/entry_points/runme.sh b/test/integration/targets/entry_points/runme.sh new file mode 100755 index 0000000..cabf153 --- /dev/null +++ b/test/integration/targets/entry_points/runme.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +set -eu -o pipefail +source virtualenv.sh +set +x +unset PYTHONPATH +export SETUPTOOLS_USE_DISTUTILS=stdlib + +base_dir="$(dirname "$(dirname "$(dirname "$(dirname "${OUTPUT_DIR}")")")")" +bin_dir="$(dirname "$(command -v pip)")" + +# deps are already installed, using --no-deps to avoid re-installing them +pip install "${base_dir}" --disable-pip-version-check --no-deps +# --use-feature=in-tree-build not available on all platforms + +for bin in "${bin_dir}/ansible"*; do + name="$(basename "${bin}")" + + entry_point="${name//ansible-/}" + entry_point="${entry_point//ansible/adhoc}" + + echo "=== ${name} (${entry_point})=${bin} ===" + + if [ "${name}" == "ansible-test" ]; then + "${bin}" --help | tee /dev/stderr | grep -Eo "^usage:\ ansible-test\ .*" + python -m ansible "${entry_point}" --help | tee /dev/stderr | grep -Eo "^usage:\ ansible-test\ .*" + else + "${bin}" --version | tee /dev/stderr | grep -Eo "(^${name}\ \[core\ .*|executable location = ${bin}$)" + python -m ansible "${entry_point}" --version | tee /dev/stderr | grep -Eo "(^${name}\ \[core\ .*|executable location = ${bin}$)" + fi +done |