Skip to content
Snippets Groups Projects
Commit 88b9f241 authored by godog's avatar godog
Browse files

Merge branch 'test-path' into 'master'

test: search scripts in PATH too

See merge request !76
parents f618e44f 4b78da24
No related branches found
No related tags found
1 merge request!76test: search scripts in PATH too
......@@ -50,9 +50,10 @@ check_hosts_ready() {
}
setup_ansible_env() {
test -e create-env.${test_name}.sh \
create_env_cmd=$(PATH=$PATH:. command -v create-env.${test_name}.sh)
test -n "$create_env_cmd" \
|| die "there is no setup script for test environment $name"
./create-env.${test_name}.sh ${test_dir} \
${create_env_cmd} ${test_dir} \
--net ${private_network} \
${LIBVIRT:+--libvirt=${LIBVIRT}} \
${MITOGEN:+--mitogen=${MITOGEN}} \
......@@ -202,10 +203,11 @@ run_integration_test ${mode}
popd
# Execute the env-specific tests, if any.
if [ -e test.${test_name}.sh ]; then
test_cmd=$(PATH=$PATH:. command -v test.${test_name}.sh)
if [ -n "$test_cmd" ]; then
export NETWORK=${private_network}
./test.${test_name}.sh \
|| die "env-specific test suite failed"
$test_cmd \
|| die "env-specific test suite failed: $test_cmd"
fi
exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment