|
|
|
@ -1,18 +1,11 @@
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
|
|
|
|
set -eu -o pipefail
|
|
|
|
set -eu -o pipefail
|
|
|
|
source virtualenv.sh
|
|
|
|
|
|
|
|
set +x
|
|
|
|
|
|
|
|
unset PYTHONPATH
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
function check_entry_points() {
|
|
|
|
pip install "${base_dir}" --disable-pip-version-check --no-deps
|
|
|
|
bin_dir="$(dirname "$(command -v pip)")"
|
|
|
|
# --use-feature=in-tree-build not available on all platforms
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for bin in "${bin_dir}/ansible"*; do
|
|
|
|
for bin in "${bin_dir}/ansible"*; do
|
|
|
|
name="$(basename "${bin}")"
|
|
|
|
name="$(basename "${bin}")"
|
|
|
|
|
|
|
|
|
|
|
|
entry_point="${name//ansible-/}"
|
|
|
|
entry_point="${name//ansible-/}"
|
|
|
|
@ -22,9 +15,31 @@ for bin in "${bin_dir}/ansible"*; do
|
|
|
|
|
|
|
|
|
|
|
|
if [ "${name}" == "ansible-test" ]; then
|
|
|
|
if [ "${name}" == "ansible-test" ]; then
|
|
|
|
"${bin}" --help | tee /dev/stderr | grep -Eo "^usage:\ ansible-test\ .*"
|
|
|
|
"${bin}" --help | tee /dev/stderr | grep -Eo "^usage:\ ansible-test\ .*"
|
|
|
|
python -m ansible "${entry_point}" --help | tee /dev/stderr | grep -Eo "^usage:\ ansible-test\ .*"
|
|
|
|
python.py -m ansible "${entry_point}" --help | tee /dev/stderr | grep -Eo "^usage:\ ansible-test\ .*"
|
|
|
|
else
|
|
|
|
else
|
|
|
|
"${bin}" --version | tee /dev/stderr | grep -Eo "(^${name}\ \[core\ .*|executable location = ${bin}$)"
|
|
|
|
"${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}$)"
|
|
|
|
python.py -m ansible "${entry_point}" --version | tee /dev/stderr | grep -Eo "(^${name}\ \[core\ .*|executable location = ${bin}$)"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
done
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
source virtualenv.sh
|
|
|
|
|
|
|
|
set +x
|
|
|
|
|
|
|
|
unset PYTHONPATH # this causes the test to fail if it was started from an existing virtual environment
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
base_dir="$(dirname "$(dirname "$(dirname "$(dirname "${OUTPUT_DIR}")")")")"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# deps are already installed, using --no-deps to avoid re-installing them
|
|
|
|
|
|
|
|
pip_options=(--disable-pip-version-check --no-deps)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo "==> check entry points using an editable install"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pip install -e "${base_dir}" "${pip_options[@]}"
|
|
|
|
|
|
|
|
check_entry_points
|
|
|
|
|
|
|
|
pip uninstall -y ansible-core
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo "==> check entry points using a normal install"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pip install "${base_dir}" "${pip_options[@]}"
|
|
|
|
|
|
|
|
check_entry_points
|
|
|
|
|
|
|
|
pip uninstall -y ansible-core
|
|
|
|
|