Browse Source

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
changes/97/644497/2
Tobias Henkel 2 years ago
parent
commit
fa0715eeac
No known key found for this signature in database GPG Key ID: 3750DEC158E5FA2
2 changed files with 5 additions and 2 deletions
  1. +5
    -0
      tools/pip.sh
  2. +0
    -2
      tox.ini

+ 5
- 0
tools/pip.sh View File

@ -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

+ 0
- 2
tox.ini View File

@ -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…
Cancel
Save