diff --git a/server/core/test/makefile b/server/core/test/makefile index d3948575d..0cccd0f64 100644 --- a/server/core/test/makefile +++ b/server/core/test/makefile @@ -32,11 +32,7 @@ runtests: @echo $(shell date) >> $(TESTLOG) @echo "Test MaxScale core" >> $(TESTLOG) @echo "-------------------------------" >> $(TESTLOG) - @ -./testhash 2>> $(TESTLOG) -ifeq ($?,0) - @echo "MaxScale core PASSED" >> $(TESTLOG) -else - @echo "MaxScale core FAILED" >> $(TESTLOG) -endif + @-./testhash 2>> $(TESTLOG) + if [ "$$?" == "0" ];then echo "MaxScale core PASSED">> $(TESTLOG);else echo "MaxScale core FAILED">> $(TESTLOG);fi @echo "" >> $(TESTLOG) - @cat $(TESTLOG) >> $(TEST_MAXSCALE_LOG) \ No newline at end of file + @cat $(TESTLOG) >> $(TEST_MAXSCALE_LOG) diff --git a/server/modules/routing/Makefile b/server/modules/routing/Makefile index a1095304c..dbb050375 100644 --- a/server/modules/routing/Makefile +++ b/server/modules/routing/Makefile @@ -94,19 +94,15 @@ install: $(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/test/test_hints/syntax_check.sh b/server/modules/routing/readwritesplit/test/test_hints/syntax_check.sh index 595a3814e..8c09d7348 100755 --- a/server/modules/routing/readwritesplit/test/test_hints/syntax_check.sh +++ b/server/modules/routing/readwritesplit/test/test_hints/syntax_check.sh @@ -21,10 +21,10 @@ fi ./rwsplit_hints.sh dummy.log $THOST $TPORT $TMASTER_ID $TUSER $TPWD $TESTINPUT -exp_count=`cat error_tests | grep -c '.*'` -err_count=`tail -n $exp_count ../../../../../test/log/skygw_err*|grep -c 'Hint ignored'` +exp_count=`cat error_tests|wc -l` +err_count=`tac ../../../../../test/log/skygw_err* | gawk '/enabled/{if(!bg){ bg = 1} else exit 0}{if(bg) print}'|grep -c 'Hint ignored'` -if [ "$err_count" == "$exp_count" ] +if [[ $err_count -ge $exp_count ]] then echo "Test set: PASSED">>$TLOG; else