From ce5dc19ecc655b776a26f38f90bd2264aaa1f19b Mon Sep 17 00:00:00 2001 From: VilhoRaatikka Date: Tue, 1 Apr 2014 14:11:48 -0700 Subject: [PATCH] Added read/write split router tests to a part of makefile structure. --- server/modules/routing/Makefile | 16 ++++++++++++++++ .../modules/routing/readwritesplit/Makefile | 19 ++++++++++++++++--- .../routing/readwritesplit/test/makefile | 7 +------ server/test/makefile | 12 +++++++++--- test/README | 3 ++- test/makefile | 2 +- 6 files changed, 45 insertions(+), 14 deletions(-) diff --git a/server/modules/routing/Makefile b/server/modules/routing/Makefile index c07b7b438..1e50f3455 100644 --- a/server/modules/routing/Makefile +++ b/server/modules/routing/Makefile @@ -82,4 +82,20 @@ install: $(MODULES) install -D $(MODULES) $(DEST)/MaxScale/modules (cd readwritesplit; make DEST=$(DEST) install) +cleantests: + $(MAKE) -C readwritesplit/test cleantests + $(MAKE) -C test cleantests + +buildtests: + $(MAKE) -C readwritesplit/test DEBUG=Y buildtests + $(MAKE) -C test DEBUG=Y buildtests + +runtests: + $(MAKE) -C test runtests + $(MAKE) -C readwritesplit runtests + +testall: + $(MAKE) -C test testall + $(MAKE) -C readwritesplit testall + include depend.mk diff --git a/server/modules/routing/readwritesplit/Makefile b/server/modules/routing/readwritesplit/Makefile index 5bef1abe7..2d4aba7f0 100644 --- a/server/modules/routing/readwritesplit/Makefile +++ b/server/modules/routing/readwritesplit/Makefile @@ -20,9 +20,9 @@ include ../../../../build_gateway.inc -LOGPATH := $(ROOT_PATH)/log_manager -UTILSPATH := $(ROOT_PATH)/utils -QCLASSPATH := $(ROOT_PATH)/query_classifier +LOGPATH := $(ROOT_PATH)/log_manager +UTILSPATH := $(ROOT_PATH)/utils +QCLASSPATH := $(ROOT_PATH)/query_classifier CC=cc CFLAGS=-c -fPIC -I/usr/include -I../../include -I../../../include \ @@ -61,5 +61,18 @@ depend: install: $(MODULES) install -D $(MODULES) $(DEST)/MaxScale/modules + +cleantests: + $(MAKE) -C test cleantest + +testall: + $(MAKE) -C test testall + +buildtests: + $(MAKE) -C test buildtests + +runtests: + $(MAKE) -C runtests + include depend.mk diff --git a/server/modules/routing/readwritesplit/test/makefile b/server/modules/routing/readwritesplit/test/makefile index 096e28fe7..4cfbe7214 100644 --- a/server/modules/routing/readwritesplit/test/makefile +++ b/server/modules/routing/readwritesplit/test/makefile @@ -28,14 +28,9 @@ runtests: @echo "" >> $(TESTLOG) @echo "-------------------------------" >> $(TESTLOG) @echo $(shell date) >> $(TESTLOG) - @echo "Test MaxScale R/W Split" >> $(TESTLOG) + @echo "Test Read/Write split router" >> $(TESTLOG) @echo "-------------------------------" >> $(TESTLOG) ./rwsplit.sh $(TESTLOG) $(THOST) $(TPORT_RW) $(TMASTER_ID) $(TUSER) $(TPWD) @echo "" >> $(TESTLOG) - -pesce: - @echo "fine" - - \ No newline at end of file diff --git a/server/test/makefile b/server/test/makefile index e05e1a975..5bab4a666 100644 --- a/server/test/makefile +++ b/server/test/makefile @@ -39,8 +39,15 @@ testall: @echo "-------------------------------" >> $(TESTLOG) @echo $(shell date) >> $(TESTLOG) @echo "Test Server Core" >> $(TESTLOG) - $(MAKE) -C $(ROOT_PATH)/server/core testall - @echo "Query Classifier PASSED" >> $(TESTLOG) + $(MAKE) -C $(ROOT_PATH)/server/core testall + @echo "Core PASSED" >> $(TESTLOG) + @echo "" >> $(TESTLOG) + @echo "-------------------------------" >> $(TESTLOG) + @echo $(shell date) >> $(TESTLOG) + @echo "Test Modules" >> $(TESTLOG) + $(MAKE) -C $(ROOT_PATH)/server/modules/routing testall + @killall maxscale + @echo "Routing modules PASSED" >> $(TESTLOG) buildtests: @@ -63,5 +70,4 @@ runtests: @sleep 5 @echo "MaxScale server PASSED" >> $(TESTLOG) @echo "" >> $(TESTLOG) - @killall maxscale diff --git a/test/README b/test/README index cb0fbbda5..c13504058 100644 --- a/test/README +++ b/test/README @@ -57,7 +57,8 @@ MAXSCALE_HOME log_manager, query_classifier, server, - utils + utils, + modules | |- utils cleantests, buildtests, runtests, testall | | diff --git a/test/makefile b/test/makefile index 0919d698a..7a0a19bc9 100644 --- a/test/makefile +++ b/test/makefile @@ -39,7 +39,7 @@ testall: @echo "Test utils" >> $(TESTLOG) $(MAKE) -C $(ROOT_PATH)/utils testall @echo "Utils PASSED" >> $(TESTLOG) - + cleantests: $(DEL) *~ $(MAKE) -C $(ROOT_PATH)/log_manager cleantests