diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2011-06-07 12:24:58 +0100 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2011-06-07 12:24:58 +0100 |
commit | a29ef94024f2792f44cd54f11e1f2fde148f122c (patch) | |
tree | 1b31c19e213744bf64b82de33734d57bc9d8b823 | |
parent | 27de37f3523af36cc2cb88fcb0955ed5cdd7872f (diff) | |
download | rabbitmq-server-a29ef94024f2792f44cd54f11e1f2fde148f122c.tar.gz |
OK, so that approach does not work, due to the node started by erl somehow imposing some of its configuration (in particular SASL) on the tests call, and making the log tests fail. Let's just parse the output...
-rw-r--r-- | Makefile | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -20,6 +20,7 @@ MANPAGES=$(patsubst %.xml, %.gz, $(wildcard $(DOCS_DIR)/*.[0-9].xml)) WEB_MANPAGES=$(patsubst %.xml, %.man.xml, $(wildcard $(DOCS_DIR)/*.[0-9].xml) $(DOCS_DIR)/rabbitmq-service.xml) USAGES_XML=$(DOCS_DIR)/rabbitmqctl.1.xml USAGES_ERL=$(foreach XML, $(USAGES_XML), $(call usage_xml_to_erl, $(XML))) +TMP_TEST_OUT=/tmp/rabbitmq-server-test-output ifeq ($(shell python -c 'import simplejson' 2>/dev/null && echo yes),yes) PYTHON=python @@ -161,11 +162,11 @@ run-node: all RABBITMQ_SERVER_START_ARGS="$(RABBITMQ_SERVER_START_ARGS)" \ ./scripts/rabbitmq-server -# erl_call treats all communication with the node as success, so we -# have to emulate it. run-tests: all - erl -sname foo -noinput -eval \ - "case rpc:call(rabbit@$(shell hostname -s), rabbit_tests, all_tests, []) of passed -> halt(0); E -> io:format(\"~n~p~n~n\", [E]), halt(1) end." + echo "rabbit_tests:all_tests()." | $(ERL_CALL) | \ + tee $(TMP_TEST_OUT) | tail -n 1 | \ + grep '^{ok, passed}$$' > /dev/null && rm $(TMP_TEST_OUT) || \ + (cat $(TMP_TEST_OUT) && echo && rm $(TMP_TEST_OUT) && false) start-background-node: $(BASIC_SCRIPT_ENVIRONMENT_SETTINGS) \ |