~drizzle-trunk/drizzle/development

1311.1.3 by Brian Aker
Small update for test-run.pl
1
# vim:ft=automake
1 by brian
clean slate
2
# Copyright (C) 2000-2006 MySQL AB
1999.6.1 by kalebral at gmail
update Copyright strings to a more common format to help with creating the master debian copyright file
3
# Copyright (C) 2010 Monty Taylor
1 by brian
clean slate
4
#
5
# This library is free software; you can redistribute it and/or
6
# modify it under the terms of the GNU Library General Public
7
# License as published by the Free Software Foundation; version 2
8
# of the License.
9
#
10
# This library is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
# Library General Public License for more details.
14
#
15
# You should have received a copy of the GNU Library General Public
16
# License along with this library; if not, write to the Free
1802.10.2 by Monty Taylor
Update all of the copyright headers to include the correct address.
17
# Software Foundation, Inc., 51 Franklin Place - Suite 330, Boston,
18
# MA 02110-1301, USA
1 by brian
clean slate
19
20
benchdir_root=		$(prefix)
21
testdir =	        $(benchdir_root)/mysql-test
1192.3.55 by Robert Collins
Merged from Robert: changed subdir make files to be included makefiles.
22
EXTRA_SCRIPTS = 	tests/valgrind.supp $(PRESCRIPTS)
2170.3.1 by patrick crews
Updated tests/include.am as needed
23
GENSCRIPTS =		tests/dtr tests/mtr tests/test-run tests/dbqp
1192.3.55 by Robert Collins
Merged from Robert: changed subdir make files to be included makefiles.
24
PRESCRIPTS =		tests/test-run.pl tests/stress-test.pl
1093.9.13 by Monty Taylor
pandora-build v0.42 - Started splitting out plugin system into pandora-build
25
PLUGIN_TESTS =		$(pandora_plugin_test_list)
2109.1.3 by Lee Bieber
Add execute test suite to regular test run
26
NORMAL_TESTS =		main,bool_type,cast,ddl_transactions,execute,flush_tables,identifiers,jp,mysql_compatibility,regression,tamil,time_type,unsigned_integer_type,uuid_type,microtime_type,$(PLUGIN_TESTS)
2057.2.7 by Brian Aker
Remove need for committed type for microtime in proto.
27
ALL_TESTS =		main,big,jp,tamil,regression,microtime_type,$(PLUGIN_TESTS)
236.1.36 by Monty Taylor
Removed mysql-test from the install.
28
noinst_SCRIPTS =	$(GENSCRIPTS) $(PRESCRIPTS)
1192.3.55 by Robert Collins
Merged from Robert: changed subdir make files to be included makefiles.
29
CLEANFILES += 		$(GENSCRIPTS) tests/mtr
77.1.32 by Monty Taylor
Merged from trunk.
30
2373.1.2 by Brian Aker
Remove need to cd into test director
31
TEST_RUN= $(PERL) -I$(top_srcdir)/tests/lib \
32
		${top_srcdir}/tests/test-run.pl \
33
		--top-srcdir=${top_srcdir} \
34
		--top-builddir=${top_builddir} \
35
		--vardir=${top_builddir}/tests/var \
2119.2.1 by patrick crews
Re-merge with trunk to fix make-distcheck
36
		--reorder \
2373.1.2 by Brian Aker
Remove need to cd into test director
37
		--suitepath=${top_srcdir}/plugin \
38
		--testdir=${top_srcdir}/tests \
1819.3.1 by patrick crews
Fixed include file causing test failure + updated tests/include.am to use dtr vs. mtr
39
		--dtr-build-thread=$$$$
685.1.13 by Monty Taylor
Attempt at some VPATH support for test suite.
40
2373.1.2 by Brian Aker
Remove need to cd into test director
41
TEST_RUN_MEM= $(PERL) -I$(top_srcdir)/tests/lib \
42
	      ${top_srcdir}/tests/test-run.pl \
43
	      --top-srcdir=${top_srcdir} \
44
	      --top-builddir=${top_builddir} \
2119.2.1 by patrick crews
Re-merge with trunk to fix make-distcheck
45
	      --mem \
46
	      --reorder \
2373.1.2 by Brian Aker
Remove need to cd into test director
47
	      --suitepath=${top_srcdir}/plugin \
48
	      --testdir=${top_srcdir}/tests \
2119.2.1 by patrick crews
Re-merge with trunk to fix make-distcheck
49
	      --dtr-build-thread=$$$$
1976.6.3 by Brian Aker
Updating the test system to allow for "make test-mem"
50
2373.1.2 by Brian Aker
Remove need to cd into test director
51
TEST_RUN_DBQP= $(PYTHON) $(top_srcdir)/tests/dbqp.py \
52
		--top-srcdir=${top_srcdir} \
53
		--top-builddir=${top_builddir} \
2124.2.5 by Patrick Crews
Added make target to run with dbqp! : )
54
		--reorder \
2373.1.2 by Brian Aker
Remove need to cd into test director
55
		--basedir=${top_srcdir} \
56
		--testdir=${top_srcdir}/tests \
57
                --workdir=${top_srcdir}/tests/workdir
2124.2.3 by Patrick Crews
Added options for top-srcdir and top-builddir to assist with creating a make target for dbqp
58
2429.2.1 by patrick crews
Merge with trunk
59
TEST_RUN_DBQP_MODE= $(PYTHON) $(top_srcdir)/tests/dbqp.py \
60
		--top-srcdir=${top_srcdir} \
61
		--top-builddir=${top_builddir} \
62
		--basedir=${top_srcdir} \
63
		--testdir=${top_srcdir}/tests \
64
		--workdir=${top_srcdir}/tests/workdir
65
2124.2.3 by Patrick Crews
Added options for top-srcdir and top-builddir to assist with creating a make target for dbqp
66
1192.3.55 by Robert Collins
Merged from Robert: changed subdir make files to be included makefiles.
67
EXTRA_DIST += \
685.1.8 by Monty Taylor
Added missing things to Makefiles for distcheck.
68
	$(EXTRA_SCRIPTS) \
2324.2.4 by patrick crews
Updated include.am for changes
69
	${srcdir}/tests/crashme_tests \
2170.3.1 by patrick crews
Updated tests/include.am as needed
70
	${srcdir}/tests/dbqp.py \
2235.4.1 by patrick crews
Updated tests/include.am to include dbqp files
71
	${srcdir}/tests/dbqp_data \
2337.1.20 by patrick crews
Updated tests/include.am
72
	${srcdir}/tests/randgen \
2235.4.1 by patrick crews
Updated tests/include.am to include dbqp files
73
	${srcdir}/tests/randgen_tests \
2324.2.3 by patrick crews
Initial voodoo worked to give us a crashme mode. Need docs still
74
	${srcdir}/tests/sql-bench \
75
	${srcdir}/tests/sqlbench_tests \
2324.2.6 by patrick crews
Fix of dumb typo : (
76
	${srcdir}/tests/sysbench_tests \
1530.2.2 by Monty Taylor
Removed cruft from the tree that we don't need. Also, add things to
77
	${srcdir}/tests/README.stress \
1192.3.62 by Monty Taylor
Removed a bunch of files that are cruft, useless or just plain suck.
78
	${srcdir}/tests/suite \
79
	${srcdir}/tests/t \
80
	${srcdir}/tests/include/*.inc \
81
	${srcdir}/tests/include/*.sql \
82
	${srcdir}/tests/include/*.test \
83
	${srcdir}/tests/r/*.result \
84
	${srcdir}/tests/r/*.require \
1530.2.2 by Monty Taylor
Removed cruft from the tree that we don't need. Also, add things to
85
	${srcdir}/tests/r/pbxt/*result \
1192.3.62 by Monty Taylor
Removed a bunch of files that are cruft, useless or just plain suck.
86
	${srcdir}/tests/std_data \
87
	${srcdir}/tests/lib/*.pl \
2119.2.1 by patrick crews
Re-merge with trunk to fix make-distcheck
88
        ${srcdir}/tests/lib/*.py \
2337.1.15 by patrick crews
Code cleanup / reorganization
89
	${srcdir}/tests/lib/dbqp_modes/crashme/*.py \
90
	${srcdir}/tests/lib/dbqp_modes/dtr/*.py \
2337.1.1 by patrick crews
Cleanup of option handling + test modes. Initial work for expanding dbqp capabilities to do neat things
91
	${srcdir}/tests/lib/dbqp_modes/randgen/*.py \
92
	${srcdir}/tests/lib/dbqp_modes/sqlbench/*py \
93
	${srcdir}/tests/lib/dbqp_modes/sysbench/*py \
94
	${srcdir}/tests/lib/dbqp_opts/*.py \
2119.2.1 by patrick crews
Re-merge with trunk to fix make-distcheck
95
	${srcdir}/tests/lib/My/*.pm \
96
        ${srcdir}/tests/lib/server_mgmt/*py \
2088.9.7 by patrick crews
updates to include.am
97
	${srcdir}/tests/lib/sys_mgmt/*py \
98
	${srcdir}/tests/lib/test_mgmt/*py \
1840.1.3 by Monty Taylor
Added support for valgrind suppressions.
99
	tests/strip-valgrind
685.1.8 by Monty Taylor
Added missing things to Makefiles for distcheck.
100
2392.1.1 by Brian Aker
Fixes for --help work.
101
102
check-local: tests/var/drizzle test-drizzle
103
104
tests/var:
105
	$(mkdir_p) tests/var
106
107
tests/var/drizzle: tests/var
108
	$(mkdir_p) tests/var/drizzle
109
1 by brian
clean slate
110
168 by Brian Aker
Rename of test (better tab completion!)
111
# dtr - a shortcut for executing test-run.pl
2392.1.1 by Brian Aker
Fixes for --help work.
112
tests/dtr: tests/var/drizzle
1241.11.2 by Monty Taylor
Fixed symlinks.
113
	$(RM) -f tests/dtr
114
	$(LN_S) test-run.pl tests/dtr
115
2392.1.1 by Brian Aker
Fixes for --help work.
116
tests/mtr: tests/var/drizzle
1241.11.2 by Monty Taylor
Fixed symlinks.
117
	$(RM) -f tests/mtr
118
	$(LN_S) test-run.pl tests/mtr
1 by brian
clean slate
119
168 by Brian Aker
Rename of test (better tab completion!)
120
# test-run - a shortcut for executing test-run.pl
2392.1.1 by Brian Aker
Fixes for --help work.
121
tests/test-run: tests/var/drizzle
1192.3.55 by Robert Collins
Merged from Robert: changed subdir make files to be included makefiles.
122
	$(RM) -f tests/test-run
1241.11.2 by Monty Taylor
Fixed symlinks.
123
	$(LN_S) test-run.pl tests/test-run
1 by brian
clean slate
124
2392.1.1 by Brian Aker
Fixes for --help work.
125
tests/dbqp: tests/var/drizzle
2170.3.1 by patrick crews
Updated tests/include.am as needed
126
	$(RM) -f tests/dbqp
127
	$(LN_S) dbqp.py tests/dbqp
128
236.1.22 by Monty Taylor
A couple of changes to move the actual test code to the tests dir and attempt
129
2373.1.2 by Brian Aker
Remove need to cd into test director
130
.PHONY: test
131
.PHONY: test-all
132
.PHONY: test-big
133
.PHONY: test-drizzle
134
.PHONY: test-dbqp
135
.PHONY: test-plugins
236.1.22 by Monty Taylor
A couple of changes to move the actual test code to the tests dir and attempt
136
137
# Target 'test' will run the regression test suite using the built server.
138
#
139
# If you are running in a shared environment, users can avoid clashing
140
# port numbers by setting individual small numbers 1-100 to the
141
# environment variable MTR_BUILD_THREAD. The script "test-run"
142
# will then calculate the various port numbers it needs from this,
143
# making sure each user use different ports.
144
2392.1.1 by Brian Aker
Fixes for --help work.
145
test: tests/var/drizzle check
236.1.22 by Monty Taylor
A couple of changes to move the actual test code to the tests dir and attempt
146
370.1.1 by arjen at com
Initial mods for making all tests work again. Some tests adapted+added.
147
# Please keep the list of tests in alphabetical order for ease of
148
# maintenance and verification
149
2373.1.2 by Brian Aker
Remove need to cd into test director
150
#check_PROGRAMS+= test-all
151
2392.1.1 by Brian Aker
Fixes for --help work.
152
test-all: tests/var/drizzle
2373.1.2 by Brian Aker
Remove need to cd into test director
153
	$(TEST_RUN) $(TEST_RUN_EXTRA_OPTIONS) --fast --force --suite=$(ALL_TESTS)
2151.9.1 by vjsamuel1990 at gmail
Merge fix bug 715789
154
2392.1.1 by Brian Aker
Fixes for --help work.
155
test-mem: tests/var/drizzle
2373.1.2 by Brian Aker
Remove need to cd into test director
156
	$(TEST_RUN_MEM) $(TEST_RUN_EXTRA_OPTIONS) --fast --force --suite=$(NORMAL_TESTS)
2151.9.1 by vjsamuel1990 at gmail
Merge fix bug 715789
157
2392.1.1 by Brian Aker
Fixes for --help work.
158
test-drizzle: tests/var/drizzle
2373.1.2 by Brian Aker
Remove need to cd into test director
159
	$(TEST_RUN) $(TEST_RUN_EXTRA_OPTIONS) --fast --force --suite=$(NORMAL_TESTS)
2151.9.1 by vjsamuel1990 at gmail
Merge fix bug 715789
160
2392.1.1 by Brian Aker
Fixes for --help work.
161
gdb-drizzled: tests/var/drizzle
2312.1.1 by Brian Aker
Introduce a simple string like class (we have byte strings that we use where it is not safe to use std::string because of binary data and silent issues with c_str()).
162
	./libtool --mode=execute gdb ./drizzled/drizzled
163
2392.1.1 by Brian Aker
Fixes for --help work.
164
test-valgrind: tests/var/drizzle
2392.1.2 by Brian Aker
This fixes up the valgrind issues (ie path, and the testing of drizzletest)
165
	$(TEST_RUN) $(TEST_RUN_EXTRA_OPTIONS) --valgrind --force --suite=$(NORMAL_TESTS) && python tests/strip-valgrind
2151.9.1 by vjsamuel1990 at gmail
Merge fix bug 715789
166
2392.1.1 by Brian Aker
Fixes for --help work.
167
test-valgrind-suppressions: tests/var/drizzle
2392.1.2 by Brian Aker
This fixes up the valgrind issues (ie path, and the testing of drizzletest)
168
	$(TEST_RUN) $(TEST_RUN_EXTRA_OPTIONS) --valgrind --valgrind-option='--gen-suppressions=all' --valgrind-option='--show-reachable=yes' --force --suite=$(NORMAL_TESTS) && python tests/strip-valgrind)
2151.9.1 by vjsamuel1990 at gmail
Merge fix bug 715789
169
2392.1.1 by Brian Aker
Fixes for --help work.
170
test-junitxml: tests/var/drizzle
2373.1.2 by Brian Aker
Remove need to cd into test director
171
	$(TEST_RUN) $(TEST_RUN_EXTRA_OPTIONS) --fast --force --suite=$(NORMAL_TESTS) --subunit | subunit2junitxml --no-passthrough > junit-format.xml
2151.9.1 by vjsamuel1990 at gmail
Merge fix bug 715789
172
2392.1.1 by Brian Aker
Fixes for --help work.
173
test-big: tests/var/drizzle
2373.1.2 by Brian Aker
Remove need to cd into test director
174
	$(TEST_RUN) $(TEST_RUN_EXTRA_OPTIONS) --fast --force --suite=big
2151.9.1 by vjsamuel1990 at gmail
Merge fix bug 715789
175
2392.1.1 by Brian Aker
Fixes for --help work.
176
test-big-junitxml: tests/var/drizzle
2373.1.2 by Brian Aker
Remove need to cd into test director
177
	$(TEST_RUN) $(TEST_RUN_EXTRA_OPTIONS) --fast --force --suite=big --subunit | subunit2junitxml --no-passthrough > junit-format-big.xml
2151.9.1 by vjsamuel1990 at gmail
Merge fix bug 715789
178
2392.1.1 by Brian Aker
Fixes for --help work.
179
test-jp: tests/var/drizzle
2373.1.2 by Brian Aker
Remove need to cd into test director
180
	$(TEST_RUN) $(TEST_RUN_EXTRA_OPTIONS) --fast --force --suite=jp
2151.9.1 by vjsamuel1990 at gmail
Merge fix bug 715789
181
2392.1.1 by Brian Aker
Fixes for --help work.
182
test-plugins: tests/var/drizzle
2373.1.2 by Brian Aker
Remove need to cd into test director
183
	$(TEST_RUN) $(TEST_RUN_EXTRA_OPTIONS) --fast --force --suite=$(PLUGIN_TESTS)
2151.9.1 by vjsamuel1990 at gmail
Merge fix bug 715789
184
2392.1.1 by Brian Aker
Fixes for --help work.
185
test-dbqp: tests/var/drizzle
2373.1.2 by Brian Aker
Remove need to cd into test director
186
	$(TEST_RUN_DBQP) $(TEST_RUN_EXTRA_OPTIONS) --fast --force --suite=$(NORMAL_TESTS)
2124.2.4 by Patrick Crews
Tinkering with include.am
187
2429.2.1 by patrick crews
Merge with trunk
188
test-randgen: tests/var/drizzle
189
	$(TEST_RUN_DBQP_MODE) --mode=randgen --suite=main
2124.2.3 by Patrick Crews
Added options for top-srcdir and top-builddir to assist with creating a make target for dbqp
190
1192.3.55 by Robert Collins
Merged from Robert: changed subdir make files to be included makefiles.
191
distclean-local: nukevar
192
193
nukevar:
2124.2.4 by Patrick Crews
Tinkering with include.am
194
	rm -rf tests/var \
2194.2.1 by patrick crews
Integrated randgen with dbqp. We now have mode=randgen and a set of randgen test suites (very basic now). Output = same as dtr : ) We also have mode=cleanup to kill any servers we have started. Docs updates too. Gendata utility allows us to populate test servers
195
        rm -rf tests/workdir \
2151.8.2 by patrick crews
change to include.am
196
        rm tests/dbqp_data/*
2124.2.4 by Patrick Crews
Tinkering with include.am
197
 
1192.3.55 by Robert Collins
Merged from Robert: changed subdir make files to be included makefiles.
198
199
.PHONY: nukevar