diff options
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 |