From 5f12731797baea35701b20d7d87ab22d1f4adf33 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Tue, 2 Aug 2016 14:00:56 -0700 Subject: [PATCH] Run more integration tests on FreeBSD. (#16923) --- test/integration/Makefile | 10 +++++----- test/utils/shippable/remote-integration.sh | 6 ------ 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/test/integration/Makefile b/test/integration/Makefile index ee8be66d685..070597ab1d5 100644 --- a/test/integration/Makefile +++ b/test/integration/Makefile @@ -134,7 +134,7 @@ test_group_by: setup test_handlers: ansible-playbook test_handlers.yml --tags scenario1 -i inventory.handlers -e @$(VARS_FILE) $(CREDENTIALS_ARG) -v $(TEST_FLAGS) - [ "$$(ansible-playbook test_handlers.yml --tags scenario2 -l A -i inventory.handlers -e @$(VARS_FILE) $(CREDENTIALS_ARG) -v $(TEST_FLAGS) | grep -Po 'RUNNING HANDLER \[test_handlers : \K[^\]]+')" = "test handler" ] + [ "$$(ansible-playbook test_handlers.yml --tags scenario2 -l A -i inventory.handlers -e @$(VARS_FILE) $(CREDENTIALS_ARG) -v $(TEST_FLAGS) | egrep -o 'RUNNING HANDLER \[test_handlers : .*?]')" = "RUNNING HANDLER [test_handlers : test handler]" ] # Not forcing, should only run on successful host [ "$$(ansible-playbook test_force_handlers.yml --tags normal -i inventory.handlers -e @$(VARS_FILE) $(CREDENTIALS_ARG) -v $(TEST_FLAGS) | egrep -o CALLED_HANDLER_. | sort | uniq | xargs)" = "CALLED_HANDLER_B" ] # Forcing from command line @@ -203,14 +203,14 @@ blocks: setup rm -f block_test.out # run the test and check to make sure the right number of completions was logged ansible-playbook -vv -e outputdir=$(TEST_DIR) test_blocks/main.yml | tee block_test.out - sed -r 's/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g' block_test.out >block_test_wo_colors.out - [ "$$(grep 'TEST COMPLETE' block_test.out | wc -l)" = "$$(egrep '^[0-9]+ plays in' block_test_wo_colors.out | cut -f1 -d' ')" ] + env python -c 'import sys, re; sys.stdout.write(re.sub("\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]", "", sys.stdin.read()))' block_test_wo_colors.out + [ "$$(grep 'TEST COMPLETE' block_test.out | wc -l | sed 's/ *//')" = "$$(egrep '^[0-9]+ plays in' block_test_wo_colors.out | cut -f1 -d' ')" ] # cleanup the output log again, to make sure the test is clean rm -f block_test.out block_test_wo_colors.out # run test with free strategy and again count the completions ansible-playbook -vv -e outputdir=$(TEST_DIR) test_blocks/main.yml -e test_strategy=free | tee block_test.out - sed -r 's/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g' block_test.out >block_test_wo_colors.out - [ "$$(grep 'TEST COMPLETE' block_test.out | wc -l)" = "$$(egrep '^[0-9]+ plays in' block_test_wo_colors.out | cut -f1 -d' ')" ] + env python -c 'import sys, re; sys.stdout.write(re.sub("\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]", "", sys.stdin.read()))' block_test_wo_colors.out + [ "$$(grep 'TEST COMPLETE' block_test.out | wc -l | sed 's/ *//')" = "$$(egrep '^[0-9]+ plays in' block_test_wo_colors.out | cut -f1 -d' ')" ] cloud: amazon rackspace azure diff --git a/test/utils/shippable/remote-integration.sh b/test/utils/shippable/remote-integration.sh index fda689511f7..cf3f6ce7291 100644 --- a/test/utils/shippable/remote-integration.sh +++ b/test/utils/shippable/remote-integration.sh @@ -150,12 +150,6 @@ set -u cd test/integration -# FIXME: these test targets fail -sed -i '' 's/ blocks / /;' Makefile -sed -i '' 's/ pull / /;' Makefile -sed -i '' 's/ test_handlers / /;' Makefile -sed -i '' 's/ no_log / /;' Makefile - # TODO: support httptester via reverse ssh tunnel rm -rf "/tmp/shippable"