mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
allow tests to run with parameters
also fixed test_test_infra to allow tags
This commit is contained in:
parent
5cbdaff9fd
commit
a07495e4c8
2 changed files with 5 additions and 3 deletions
|
@ -1,6 +1,8 @@
|
||||||
- hosts: testhost
|
- hosts: testhost
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
tasks:
|
tags:
|
||||||
|
- always
|
||||||
|
tasks:
|
||||||
- fail:
|
- fail:
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
register: fail_out
|
register: fail_out
|
||||||
|
@ -14,7 +16,7 @@
|
||||||
register: assert_out
|
register: assert_out
|
||||||
|
|
||||||
- debug:
|
- debug:
|
||||||
msg: assert works ({{ assert_out.failed }})
|
msg: assert works ({{ assert_out.failed }})
|
||||||
|
|
||||||
- fail:
|
- fail:
|
||||||
msg: fail actually failed
|
msg: fail actually failed
|
||||||
|
|
|
@ -10,6 +10,6 @@ if [ "${TARGET}" = "sanity" ]; then
|
||||||
else
|
else
|
||||||
docker build --pull=true -t ansible_test/${TARGET} test/utils/docker/${TARGET}
|
docker build --pull=true -t ansible_test/${TARGET} test/utils/docker/${TARGET}
|
||||||
docker run -d --volume="${PWD}:/root/ansible" ${TARGET_OPTIONS} ansible_test/${TARGET} > /tmp/cid_${TARGET}
|
docker run -d --volume="${PWD}:/root/ansible" ${TARGET_OPTIONS} ansible_test/${TARGET} > /tmp/cid_${TARGET}
|
||||||
docker exec -ti $(cat /tmp/cid_${TARGET}) /bin/sh -c 'cd /root/ansible; . hacking/env-setup; (cd test/integration; LC_ALL=en_US.utf-8 make)'
|
docker exec -ti $(cat /tmp/cid_${TARGET}) /bin/sh -c "export TEST_FLAGS='${TEST_FLAGS}'; cd /root/ansible; . hacking/env-setup; (cd test/integration; LC_ALL=en_US.utf-8 make)"
|
||||||
docker kill $(cat /tmp/cid_${TARGET})
|
docker kill $(cat /tmp/cid_${TARGET})
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue