VilhoRaatikka 7b40c1ee70 Changed how MaxScale unit test works.
All tests are run by executing 'make testall' in root directory. As a result all directories which contain tests will be entered and tests executed.
After tests, each directory have a test log including the last run's logs only.
Created a global test log, which is specified in test.inc. Test logs from subdirectories are concatenated to this file.
2014-04-10 19:08:28 +03:00
..
2014-04-10 19:08:28 +03:00

Source tree structure and test targets for make. In a given source directory, 
MAXSCALE_HOME/server, for example, there is a test directory which includes 
tests for that directory ('local tests') and targets for every subdirectory 
of MAXSCALE_HOME/server.

In the outline below, target, such as 'cleantest' includes instructions for 
executing tests or make command pointing to subdirectories. If target is 
followed by colon and a list of directory names ('cleantest:log_manager, 
query_classifier'), the target is executed locally and in the listed 
directories. 

Note : add new tests for any component as close to the actual implementation 
as possible. For example, DCB tests in MAXSCALE_HOME/server/core/test instead 
of MAXSCALE_HOME/server/test etc.

MAXSCALE_HOME
|
|- log_manager	cleantests, buildtests, runtests, testall
|  |
|  |- test	cleantests, buildtests, runtests, testall
|
|- query_classifier cleantests, buildtests, runtests, testall
|  |
|  |- test	cleantests, buildtests, runtests, testall
|
|- server	cleantests, buildtests, testall
|  |
|  |- core	cleantests, buildtests, runtests, testall
|  |  |
|  |  |- test	cleantests, buildtests, runtests, testall
|  |
|  |- inih
|  |  |
|  |  |- test
|  |
|  |- modules
|  |  |
|  |  |- monitor
|  |  |
|  |  |- protocol
|  |  |
|  |  |- routing
|  |  |  |
|  |  |  |- readwritesplit
|  |
|  |- test	cleantests:server/core, 
|  |   		buildtests, 
|  |		runtests, 
|  |		testall:server/core
| 
|- test          cleantests:log_manager, query_classifier, server, utils
   	         buildtests:buildtestserver, log_manager, query_classifier, server, utils
	         runtests:<empty>
	         testall:cleantests, 
			 buildtests, 
		 	 runtests, 
		 	 log_manager, 
		 	 query_classifier, 
		 	 server, 
		 	 utils,
                         modules
|
|- utils	cleantests, buildtests, runtests, testall
|  |
|  |- test	cleantests, buildtests, runtests, testall
|