~drizzle-trunk/drizzle/development

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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# vim:ft=automake
# Copyright (C) 2000-2006 MySQL AB
# Copyright (C) 2010 Monty Taylor
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; version 2
# of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 51 Franklin Place - Suite 330, Boston,
# MA 02110-1301, USA

benchdir_root=		$(prefix)
testdir =	        $(benchdir_root)/mysql-test
EXTRA_SCRIPTS = 	tests/valgrind.supp $(PRESCRIPTS)
GENSCRIPTS =		tests/dtr tests/mtr tests/test-run tests/dbqp
PRESCRIPTS =		tests/test-run.pl tests/stress-test.pl
PLUGIN_TESTS =		$(pandora_plugin_test_list)
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)
ALL_TESTS =		main,big,jp,tamil,regression,microtime_type,$(PLUGIN_TESTS)
noinst_SCRIPTS =	$(GENSCRIPTS) $(PRESCRIPTS)
CLEANFILES += 		$(GENSCRIPTS) tests/mtr

TEST_RUN= $(PERL) -I$(top_srcdir)/tests/lib \
		${top_srcdir}/tests/test-run.pl \
		--top-srcdir=${top_srcdir} \
		--top-builddir=${top_builddir} \
		--vardir=${top_builddir}/tests/var \
		--reorder \
		--suitepath=${top_srcdir}/plugin \
		--testdir=${top_srcdir}/tests \
		--dtr-build-thread=$$$$

TEST_RUN_MEM= $(PERL) -I$(top_srcdir)/tests/lib \
	      ${top_srcdir}/tests/test-run.pl \
	      --top-srcdir=${top_srcdir} \
	      --top-builddir=${top_builddir} \
	      --mem \
	      --reorder \
	      --suitepath=${top_srcdir}/plugin \
	      --testdir=${top_srcdir}/tests \
	      --dtr-build-thread=$$$$

TEST_RUN_DBQP= $(PYTHON) $(top_srcdir)/tests/dbqp.py \
		--top-srcdir=${top_srcdir} \
		--top-builddir=${top_builddir} \
		--reorder \
		--basedir=${top_srcdir} \
		--testdir=${top_srcdir}/tests \
                --workdir=${top_srcdir}/tests/workdir


EXTRA_DIST += \
	      $(EXTRA_SCRIPTS) \
	      ${srcdir}/tests/crashme_tests \
	      ${srcdir}/tests/dbqp.py \
	      ${srcdir}/tests/dbqp_data \
	      ${srcdir}/tests/randgen_tests \
	      ${srcdir}/tests/sql-bench \
	      ${srcdir}/tests/sqlbench_tests \
	      ${srcdir}/tests/sysbench_tests \
	      ${srcdir}/tests/README.stress \
	      ${srcdir}/tests/suite \
	      ${srcdir}/tests/t \
	      ${srcdir}/tests/include/*.inc \
	      ${srcdir}/tests/include/*.sql \
	      ${srcdir}/tests/include/*.test \
	      ${srcdir}/tests/r/*.result \
	      ${srcdir}/tests/r/*.require \
	      ${srcdir}/tests/r/pbxt/*result \
	      ${srcdir}/tests/std_data \
	      ${srcdir}/tests/lib/*.pl \
	      ${srcdir}/tests/lib/*.py \
	      ${srcdir}/tests/lib/drizzle_test_run/*.py \
	      ${srcdir}/tests/lib/My/*.pm \
	      ${srcdir}/tests/lib/randgen/*.py \
	      ${srcdir}/tests/lib/server_mgmt/*py \
	      ${srcdir}/tests/lib/sqlbench/*py \
	      ${srcdir}/tests/lib/sysbench/*py \
	      ${srcdir}/tests/lib/sys_mgmt/*py \
	      ${srcdir}/tests/lib/test_mgmt/*py \
	      tests/strip-valgrind

check-local: tests/var/drizzle test-drizzle

tests/var:
	$(mkdir_p) tests/var

tests/var/drizzle: tests/var
	$(mkdir_p) tests/var/drizzle


# dtr - a shortcut for executing test-run.pl
tests/dtr: tests/var/drizzle
	$(RM) -f tests/dtr
	$(LN_S) test-run.pl tests/dtr

tests/mtr: tests/var/drizzle
	$(RM) -f tests/mtr
	$(LN_S) test-run.pl tests/mtr

# test-run - a shortcut for executing test-run.pl
tests/test-run: tests/var/drizzle
	$(RM) -f tests/test-run
	$(LN_S) test-run.pl tests/test-run

tests/dbqp: tests/var/drizzle
	$(RM) -f tests/dbqp
	$(LN_S) dbqp.py tests/dbqp


.PHONY: test
.PHONY: test-all
.PHONY: test-big
.PHONY: test-drizzle
.PHONY: test-dbqp
.PHONY: test-plugins

# Target 'test' will run the regression test suite using the built server.
#
# If you are running in a shared environment, users can avoid clashing
# port numbers by setting individual small numbers 1-100 to the
# environment variable MTR_BUILD_THREAD. The script "test-run"
# will then calculate the various port numbers it needs from this,
# making sure each user use different ports.

test: tests/var/drizzle check

# Please keep the list of tests in alphabetical order for ease of
# maintenance and verification

#check_PROGRAMS+= test-all

test-all: tests/var/drizzle
	$(TEST_RUN) $(TEST_RUN_EXTRA_OPTIONS) --fast --force --suite=$(ALL_TESTS)

test-mem: tests/var/drizzle
	$(TEST_RUN_MEM) $(TEST_RUN_EXTRA_OPTIONS) --fast --force --suite=$(NORMAL_TESTS)

test-drizzle: tests/var/drizzle
	$(TEST_RUN) $(TEST_RUN_EXTRA_OPTIONS) --fast --force --suite=$(NORMAL_TESTS)

gdb-drizzled: tests/var/drizzle
	./libtool --mode=execute gdb ./drizzled/drizzled

test-valgrind: tests/var/drizzle
	$(TEST_RUN) $(TEST_RUN_EXTRA_OPTIONS) --valgrind --force --suite=$(NORMAL_TESTS) && python tests/strip-valgrind

test-valgrind-suppressions: tests/var/drizzle
	$(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)

test-junitxml: tests/var/drizzle
	$(TEST_RUN) $(TEST_RUN_EXTRA_OPTIONS) --fast --force --suite=$(NORMAL_TESTS) --subunit | subunit2junitxml --no-passthrough > junit-format.xml

test-big: tests/var/drizzle
	$(TEST_RUN) $(TEST_RUN_EXTRA_OPTIONS) --fast --force --suite=big

test-big-junitxml: tests/var/drizzle
	$(TEST_RUN) $(TEST_RUN_EXTRA_OPTIONS) --fast --force --suite=big --subunit | subunit2junitxml --no-passthrough > junit-format-big.xml

test-jp: tests/var/drizzle
	$(TEST_RUN) $(TEST_RUN_EXTRA_OPTIONS) --fast --force --suite=jp

test-plugins: tests/var/drizzle
	$(TEST_RUN) $(TEST_RUN_EXTRA_OPTIONS) --fast --force --suite=$(PLUGIN_TESTS)

test-dbqp: tests/var/drizzle
	$(TEST_RUN_DBQP) $(TEST_RUN_EXTRA_OPTIONS) --fast --force --suite=$(NORMAL_TESTS)

distclean-local: nukevar

nukevar:
	rm -rf tests/var \
        rm -rf tests/workdir \
        rm tests/dbqp_data/*
 

.PHONY: nukevar