From a07495e4c8280edd7897f29fb994abfda9d2d24b Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Thu, 10 Mar 2016 10:49:44 -0500 Subject: [PATCH] allow tests to run with parameters also fixed test_test_infra to allow tags --- test/integration/test_test_infra.yml | 6 ++++-- test/utils/run_tests.sh | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/test/integration/test_test_infra.yml b/test/integration/test_test_infra.yml index b05d0e2e3e..b78e36d2c9 100644 --- a/test/integration/test_test_infra.yml +++ b/test/integration/test_test_infra.yml @@ -1,6 +1,8 @@ - hosts: testhost gather_facts: no - tasks: + tags: + - always + tasks: - fail: ignore_errors: yes register: fail_out @@ -14,7 +16,7 @@ register: assert_out - debug: - msg: assert works ({{ assert_out.failed }}) + msg: assert works ({{ assert_out.failed }}) - fail: msg: fail actually failed diff --git a/test/utils/run_tests.sh b/test/utils/run_tests.sh index d4787da69a..05c110d19e 100755 --- a/test/utils/run_tests.sh +++ b/test/utils/run_tests.sh @@ -10,6 +10,6 @@ if [ "${TARGET}" = "sanity" ]; then else 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 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}) fi