Merging check/functional jobs into one

Change-Id: I33620151414d647b904db41acf849086004d5234
This commit is contained in:
Major Hayden 2015-12-03 08:58:37 -06:00
parent b204440ddc
commit 20106572ed
2 changed files with 4 additions and 13 deletions

View File

@ -16,7 +16,6 @@
set -euov
FUNCTIONAL_TEST=${FUNCTIONAL_TEST:-false}
CHECK_MODE_TEST=${CHECK_MODE_TEST:-true}
# prep the host
if [ "$(which apt-get)" ]; then
@ -38,10 +37,6 @@ for tox_env in $(awk -F= '/envlist/ {print $2}' tox.ini | sed 's/,/ /g'); do
if ${FUNCTIONAL_TEST}; then
tox -e ${tox_env}
fi
elif [ "${tox_env}" == "ansible-check" ]; then
if ${CHECK_MODE_TEST}; then
tox -e ${tox_env}
fi
else
tox -e ${tox_env}
fi

12
tox.ini
View File

@ -1,7 +1,7 @@
[tox]
minversion = 1.6
skipsdist = True
envlist = docs,pep8,bashate,ansible-syntax,ansible-lint,ansible-functional,ansible-check
envlist = docs,pep8,bashate,ansible-syntax,ansible-lint,ansible-functional
[testenv]
usedevelop = True
@ -73,15 +73,11 @@ commands = ansible-lint test.yml
[testenv:ansible-functional]
changedir = tests
commands =
ansible-playbook -i inventory \
-e "rolename={toxinidir}" \
test.yml
[testenv:ansible-check]
changedir = tests
commands =
ansible-playbook -i inventory \
--check \
-e "rolename={toxinidir}" \
test.yml
ansible-playbook -i inventory \
-e "rolename={toxinidir}" \
test.yml