forked from rabbitmq/rabbitmq-delayed-message-exchange
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (31 loc) · 1.21 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
include ../umbrella.mk
RABBITMQCTL=../rabbitmq-server/scripts/rabbitmqctl
NODENAME=rabbit-test
MAIN_NODE=undefined
OTHER_NODE=undefined
OTHER_PORT=undefined
OTHER_PLUGINS=undefined
BASEDIR=${TMPDIR}/rabbitmq-delay-tests/$(OTHER_NODE)
PID_FILE=$(BASEDIR)/$(OTHER_NODE).pid
start-other-node:
RABBITMQ_MNESIA_BASE=$(BASEDIR)/rabbitmq-$(OTHER_NODE)-mnesia \
RABBITMQ_LOG_BASE=$(BASEDIR) \
RABBITMQ_NODENAME=$(OTHER_NODE) \
RABBITMQ_NODE_PORT=$(OTHER_PORT) \
RABBITMQ_ENABLED_PLUGINS_FILE=${OTHER_PLUGINS} \
RABBITMQ_PLUGINS_DIR=${TMPDIR}/rabbitmq-test/plugins \
RABBITMQ_PLUGINS_EXPAND_DIR=$(BASEDIR)/rabbitmq-$(OTHER_NODE)-plugins-expand \
RABBITMQ_PID_FILE=$(PID_FILE) \
../rabbitmq-server/scripts/rabbitmq-server >${TMPDIR}/$(OTHER_NODE).out 2>${TMPDIR}/$(OTHER_NODE).err &
$(RABBITMQCTL) -n $(OTHER_NODE) wait $(PID_FILE)
stop-other-node:
$(RABBITMQCTL) -n $(OTHER_NODE) stop
cluster-other-node:
$(RABBITMQCTL) -n $(OTHER_NODE) stop_app
$(RABBITMQCTL) -n $(OTHER_NODE) reset
$(RABBITMQCTL) -n $(OTHER_NODE) join_cluster $(MAIN_NODE)
$(RABBITMQCTL) -n $(OTHER_NODE) start_app
reset-other-node:
$(RABBITMQCTL) -n $(OTHER_NODE) stop_app
$(RABBITMQCTL) -n $(OTHER_NODE) reset
$(RABBITMQCTL) -n $(OTHER_NODE) start_app