summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2011-06-07 12:24:58 +0100
committerSimon MacMullen <simon@rabbitmq.com>2011-06-07 12:24:58 +0100
commitc4975944ad710e824d872f77c9c912046d5797dc (patch)
tree1b31c19e213744bf64b82de33734d57bc9d8b823
parentad7be9810efa313d75c8bdec22d6689db747be66 (diff)
downloadrabbitmq-server-git-c4975944ad710e824d872f77c9c912046d5797dc.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--Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 7ca68f2008..ea460f1247 100644
--- a/Makefile
+++ b/Makefile
@@ -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) \