Move ansible installation from pre_command to install phase in tox
We currently install ansible during the pre_command phase in tox. This breaks the following use case: tox -e py36 --notest ttrun <test case> This is broken now because ttrun doesn't run pre_commands. Instead we already have a pip wrapper that does the nodeenv installation. We can use this to also call zuul-manage-ansible on zuul installation. Change-Id: I680777e5406368d35366602ac37e029db91c8a5c
This commit is contained in:
parent
0f8f24e7df
commit
fa0715eeac
|
@ -38,3 +38,8 @@ then
|
|||
popd
|
||||
fi
|
||||
pip install $*
|
||||
|
||||
# Check if we're installing zuul. If so install the managed ansible as well.
|
||||
if echo "$*" | grep -vq requirements.txt; then
|
||||
zuul-manage-ansible -v
|
||||
fi
|
||||
|
|
2
tox.ini
2
tox.ini
|
@ -25,7 +25,6 @@ install_command = pip install {opts} {packages}
|
|||
whitelist_externals = bash
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
commands_pre = zuul-manage-ansible -v
|
||||
commands = stestr run {posargs}
|
||||
stestr slowest
|
||||
|
||||
|
@ -82,7 +81,6 @@ install_command = {[nodeenv]install_command}
|
|||
commands = stestr run --concurrency=1 --test-path ./tests/nodepool {posargs}
|
||||
|
||||
[testenv:remote]
|
||||
commands_pre = zuul-manage-ansible -v
|
||||
commands = stestr run --test-path ./tests/remote {posargs}
|
||||
passenv = ZUUL_TEST_ROOT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE OS_LOG_DEFAULTS ZUUL_REMOTE_IPV4 ZUUL_SSH_KEY NODEPOOL_ZK_HOST
|
||||
install_command = {[nodeenv]install_command}
|
||||
|
|
Loading…
Reference in New Issue