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
|
# 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/dbqp_work
EXTRA_DIST += \
$(EXTRA_SCRIPTS) \
${srcdir}/tests/dbqp.py \
${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/My/*.pm \
${srcdir}/tests/lib/server_mgmt/*py \
${srcdir}/tests/lib/sys_mgmt/*py \
${srcdir}/tests/lib/test_mgmt/*py \
tests/strip-valgrind
check-local: test-drizzle
# dtr - a shortcut for executing test-run.pl
tests/dtr:
$(RM) -f tests/dtr
$(LN_S) test-run.pl tests/dtr
tests/var:
$(mkdir_p) tests/var
tests/mtr:
$(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
$(RM) -f tests/test-run
$(LN_S) test-run.pl tests/test-run
tests/dbqp:
$(RM) -f tests/dbqp
$(LN_S) dbqp.py tests/dbqp
.PHONY: test \
test-all \
test-big \
test-drizzle \
test-dbqp \
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: check
# Please keep the list of tests in alphabetical order for ease of
# maintenance and verification
test-all:
( $(MAKE) $(AM_MAKEFLAGS) && cd tests && $(TEST_RUN) $(TEST_RUN_EXTRA_OPTIONS) --fast --force --suite=$(ALL_TESTS))
test-mem:
( $(MAKE) $(AM_MAKEFLAGS) && cd tests && $(TEST_RUN_MEM) $(TEST_RUN_EXTRA_OPTIONS) --fast --force --suite=$(NORMAL_TESTS))
test-drizzle:
( $(MAKE) $(AM_MAKEFLAGS) && cd tests && $(TEST_RUN) $(TEST_RUN_EXTRA_OPTIONS) --fast --force --suite=$(NORMAL_TESTS))
test-valgrind:
( $(MAKE) $(AM_MAKEFLAGS) && cd tests && $(TEST_RUN) $(TEST_RUN_EXTRA_OPTIONS) --valgrind --force --suite=$(NORMAL_TESTS) && python strip-valgrind)
test-valgrind-suppressions:
( $(MAKE) $(AM_MAKEFLAGS) && cd tests && $(TEST_RUN) $(TEST_RUN_EXTRA_OPTIONS) --valgrind --valgrind-option='--gen-suppressions=all' --valgrind-option='--show-reachable=yes' --force --suite=$(NORMAL_TESTS) && python strip-valgrind)
test-junitxml:
( $(MAKE) $(AM_MAKEFLAGS) && cd tests && $(TEST_RUN) $(TEST_RUN_EXTRA_OPTIONS) --fast --force --suite=$(NORMAL_TESTS) --subunit | subunit2junitxml --no-passthrough > junit-format.xml )
test-big:
( $(MAKE) $(AM_MAKEFLAGS) && cd tests && $(TEST_RUN) $(TEST_RUN_EXTRA_OPTIONS) --fast --force --suite=big )
test-big-junitxml:
( $(MAKE) $(AM_MAKEFLAGS) && cd tests && $(TEST_RUN) $(TEST_RUN_EXTRA_OPTIONS) --fast --force --suite=big --subunit | subunit2junitxml --no-passthrough > junit-format-big.xml )
test-jp:
( $(MAKE) $(AM_MAKEFLAGS) && cd tests && $(TEST_RUN) $(TEST_RUN_EXTRA_OPTIONS) --fast --force --suite=jp )
test-plugins:
( $(MAKE) $(AM_MAKEFLAGS) && cd tests && $(TEST_RUN) $(TEST_RUN_EXTRA_OPTIONS) --fast --force --suite=$(PLUGIN_TESTS) )
test-dbqp:
( $(MAKE) $(AM_MAKEFLAGS) && cd tests && $(TEST_RUN_DBQP) $(TEST_RUN_EXTRA_OPTIONS) --fast --force --suite=$(NORMAL_TESTS) )
distclean-local: nukevar
nukevar:
rm -rf tests/var \
rm -rf tests/dbqp_work \
rm tests/dbqp_data/*
.PHONY: nukevar
|