0.67.565
by John H. Embretsen
pb2gentest*: Automatically look for redefine file to match the given grammar file. If found, add --redefine=file to RQG command line. Also: |
1 |
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
|
0.67.305
by Bernt M. Johnsen
Copyright headres and license added |
2 |
# Use is subject to license terms.
|
3 |
#
|
|
4 |
# This program is free software; you can redistribute it and/or modify
|
|
5 |
# it under the terms of the GNU General Public License as published by
|
|
6 |
# the Free Software Foundation; version 2 of the License.
|
|
7 |
#
|
|
8 |
# This program is distributed in the hope that it will be useful, but
|
|
9 |
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
11 |
# General Public License for more details.
|
|
12 |
#
|
|
13 |
# You should have received a copy of the GNU General Public License
|
|
14 |
# along with this program; if not, write to the Free Software
|
|
0.67.565
by John H. Embretsen
pb2gentest*: Automatically look for redefine file to match the given grammar file. If found, add --redefine=file to RQG command line. Also: |
15 |
# Foundation, Inc., 51 Franklin St, Suite 500, Boston, MA 02110-1335
|
0.67.305
by Bernt M. Johnsen
Copyright headres and license added |
16 |
# USA
|
17 |
||
0.67.66
by John H. Embretsen
pb2gentest: Set MTR_BUILD_THREAD to avoid port number conflicts during parallel test runs on the same host. |
18 |
use lib 'lib'; |
19 |
use lib "$ENV{RQG_HOME}/lib"; |
|
0.67.69
by John H. Embretsen
pb2gentest.pl: Temporarily add randgen/lib as 'use' library until PB2 config can be fixed. |
20 |
use lib 'randgen/lib'; |
0.67.66
by John H. Embretsen
pb2gentest: Set MTR_BUILD_THREAD to avoid port number conflicts during parallel test runs on the same host. |
21 |
|
0.67.1
by Philip Stoev
initial import from internal tree |
22 |
use strict; |
0.89.1
by John H. Embretsen
Workaround for MySQL bug 48351: Support semisync plugin names both with and without 'lib'-prefix. With time only non-prefixed plugin name will be used. Also support other plugin dirs (release builds, sandbox builds etc) by doing recursive search for plugin files. First match wins. |
23 |
use Carp; |
0.67.66
by John H. Embretsen
pb2gentest: Set MTR_BUILD_THREAD to avoid port number conflicts during parallel test runs on the same host. |
24 |
use Cwd; |
25 |
use DBI; |
|
0.89.1
by John H. Embretsen
Workaround for MySQL bug 48351: Support semisync plugin names both with and without 'lib'-prefix. With time only non-prefixed plugin name will be used. Also support other plugin dirs (release builds, sandbox builds etc) by doing recursive search for plugin files. First match wins. |
26 |
use File::Find; |
0.99.26
by John H. Embretsen
Start using GenTest's windows() and solaris() checking subs instead of re-inventing the wheel in each pb2 script. |
27 |
use GenTest; |
0.67.66
by John H. Embretsen
pb2gentest: Set MTR_BUILD_THREAD to avoid port number conflicts during parallel test runs on the same host. |
28 |
use GenTest::Random; |
0.67.398
by John H. Embretsen
Start using BzrInfo module for reporting versions to screen and XML reports. |
29 |
use GenTest::BzrInfo; |
0.67.1
by Philip Stoev
initial import from internal tree |
30 |
use POSIX; |
0.67.74
by John H. Embretsen
pb2gentest.pl: Improved output/information when starting the script and adjusted pb2 database connection details. |
31 |
use Sys::Hostname; |
0.67.1
by Philip Stoev
initial import from internal tree |
32 |
|
33 |
my ($basedir, $vardir, $tree, $test) = @ARGV; |
|
34 |
||
35 |
#
|
|
0.70.2
by John H. Embretsen
Added new test rpl_semisync to pb2gentest.pl. |
36 |
# For further details about tests and recommended RQG options, see
|
37 |
# http://forge.mysql.com/wiki/RandomQueryGeneratorTests
|
|
38 |
#
|
|
39 |
||
0.67.78
by John H. Embretsen
pb2gentest.pl: Disable pb2 db lookup of branch id (while working out perl module issues on certain platforms). Get from env var instead, if set. Adjust messages accordingly |
40 |
print("==================== Starting $0 ====================\n"); |
0.67.124
by John H. Embretsen
pb2gentest: Simple MTR-style reporting of test results, for xref and PB2 (pass/fail only, no signature support yet). |
41 |
# Print MTR-style output saying which test suite/mode this is for PB2 reporting.
|
42 |
# So far we only support running one test at a time.
|
|
43 |
print("##############################################################################\n"); |
|
44 |
print("# $test\n"); |
|
45 |
print("##############################################################################\n"); |
|
0.67.78
by John H. Embretsen
pb2gentest.pl: Disable pb2 db lookup of branch id (while working out perl module issues on certain platforms). Get from env var instead, if set. Adjust messages accordingly |
46 |
|
0.71.1
by John H. Embretsen
Added new tests info_schema and signal_resignal to pb2gentest, and added basic "skip test" functionality. |
47 |
# Autoflush output buffers (needed when using POSIX::_exit())
|
48 |
$| = 1; |
|
0.70.2
by John H. Embretsen
Added new test rpl_semisync to pb2gentest.pl. |
49 |
|
50 |
#
|
|
0.67.114
by John H. Embretsen
pb2gentest: Add partn_pruning_compare_50 test definition, including setting path to installation of 5.0 release against which to do query result comparison. This is to be considered experimental for the time being. |
51 |
# Prepare ENV variables and other settings.
|
0.67.67
by John H. Embretsen
pb2gentest.pl: Fixed setting of MTR_BUILD_THREAD on Windows (multiple commands on single command line). Created convenience variable for checking if we are on Windows OS. |
52 |
#
|
53 |
||
0.67.565
by John H. Embretsen
pb2gentest*: Automatically look for redefine file to match the given grammar file. If found, add --redefine=file to RQG command line. Also: |
54 |
# Variable to indicate usage and location of grammar redefine files.
|
55 |
# Variable should remain undef if no redefine file is used.
|
|
56 |
my $redefine_file = undef; |
|
57 |
||
0.67.114
by John H. Embretsen
pb2gentest: Add partn_pruning_compare_50 test definition, including setting path to installation of 5.0 release against which to do query result comparison. This is to be considered experimental for the time being. |
58 |
# Local "installation" of MySQL 5.0. Default is for Unix hosts. See below for Windows.
|
59 |
my $basedirRelease50 = '/export/home/mysql-releases/mysql-5.0'; |
|
60 |
||
0.67.120
by John H. Embretsen
pb2gentest: Prepare for splitting of RQG framework and grammars by making grammar and gendata file location configurable. |
61 |
# Location of grammars and other test configuration files.
|
0.67.136
by John H. Embretsen
Minor fixes to comments in pb2{gentest,combinations}.pl |
62 |
# Will use env variable RQG_CONF if set.
|
0.67.120
by John H. Embretsen
pb2gentest: Prepare for splitting of RQG framework and grammars by making grammar and gendata file location configurable. |
63 |
# Default is currently "conf" while using legacy setup.
|
64 |
# If not absolute path, it is relative to cwd at run time, which is the randgen directory.
|
|
65 |
my $conf = $ENV{RQG_CONF}; |
|
66 |
$conf = 'conf' if not defined $conf; |
|
67 |
||
0.67.381
by Bernt M. Johnsen
Adjustments after merge |
68 |
if (osWindows()) { |
0.67.388
by John H. Embretsen
XML and pb2gentest: Automatically enable XML reporting on more hosts. Added comments and adjusted some details. |
69 |
# For tail, cdb, pscp.
|
0.67.16
by John H. Embretsen
Update paths in PB2 scripts, having modified PB2 host setup to use the randgen branch on Launchpad. |
70 |
$ENV{PATH} = 'G:\pb2\scripts\randgen\bin;G:\pb2\scripts\bin;C:\Program Files\Debugging Tools for Windows (x86);'.$ENV{PATH}; |
0.67.1
by Philip Stoev
initial import from internal tree |
71 |
$ENV{_NT_SYMBOL_PATH} = 'srv*c:\\cdb_symbols*http://msdl.microsoft.com/download/symbols;cache*c:\\cdb_symbols'; |
72 |
||
73 |
# For vlad
|
|
74 |
#ENV{MYSQL_FULL_MINIDUMP} = 1;
|
|
75 |
||
0.67.213
by John H. Embretsen
pb2gentest: Stop printining date and time twice. Also skip uname (some host information is printed later). |
76 |
#system("date /T");
|
77 |
#system("time /T");
|
|
0.67.114
by John H. Embretsen
pb2gentest: Add partn_pruning_compare_50 test definition, including setting path to installation of 5.0 release against which to do query result comparison. This is to be considered experimental for the time being. |
78 |
|
79 |
# Path to MySQL releases used for comparison runs.
|
|
80 |
$basedirRelease50 = 'G:\mysql-releases\mysql-5.0.87-win32'; # loki06 |
|
0.67.381
by Bernt M. Johnsen
Adjustments after merge |
81 |
} elsif (osSolaris()) { |
0.67.1
by Philip Stoev
initial import from internal tree |
82 |
# For libmysqlclient
|
83 |
$ENV{LD_LIBRARY_PATH}=$ENV{LD_LIBRARY_PATH}.':/export/home/pb2/scripts/lib/'; |
|
84 |
||
0.67.400
by John H. Embretsen
pb2gentest.pl: Get tmpdir from GenTest if env var TMPDIR is not set. Also, add path to XML::Writer module to PERL5LIB for Solaris (actually only needed on techra22 (sparc32-bit) right now). Rearranged the latter to a multiline statement to make it easier to maintain. |
85 |
# For DBI and DBD::mysql and XML::Writer on hosts with local setup.
|
86 |
$ENV{PERL5LIB}=$ENV{PERL5LIB}. |
|
87 |
':/export/home/pb2/scripts/DBI-1.607/'. |
|
88 |
':/export/home/pb2/scripts/DBI-1.607/lib'. |
|
89 |
':/export/home/pb2/scripts/DBI-1.607/blib/arch/'. |
|
90 |
':/export/home/pb2/scripts/DBD-mysql-4.008/lib/'. |
|
91 |
':/export/home/pb2/scripts/DBD-mysql-4.008/blib/arch/'. |
|
92 |
':/export/home/pb2/scripts/XML-Writer-0.610/lib/site_perl/'; |
|
0.67.1
by Philip Stoev
initial import from internal tree |
93 |
|
94 |
# For c++filt
|
|
95 |
$ENV{PATH} = $ENV{PATH}.':/opt/studio12/SUNWspro/bin'; |
|
96 |
||
0.67.213
by John H. Embretsen
pb2gentest: Stop printining date and time twice. Also skip uname (some host information is printed later). |
97 |
#system("uname -a");
|
98 |
#system("date");
|
|
0.67.114
by John H. Embretsen
pb2gentest: Add partn_pruning_compare_50 test definition, including setting path to installation of 5.0 release against which to do query result comparison. This is to be considered experimental for the time being. |
99 |
|
0.67.1
by Philip Stoev
initial import from internal tree |
100 |
}
|
101 |
||
0.67.66
by John H. Embretsen
pb2gentest: Set MTR_BUILD_THREAD to avoid port number conflicts during parallel test runs on the same host. |
102 |
################################################################################
|
0.71.1
by John H. Embretsen
Added new tests info_schema and signal_resignal to pb2gentest, and added basic "skip test" functionality. |
103 |
##
|
104 |
## subroutines
|
|
105 |
##
|
|
0.67.66
by John H. Embretsen
pb2gentest: Set MTR_BUILD_THREAD to avoid port number conflicts during parallel test runs on the same host. |
106 |
################################################################################
|
0.71.1
by John H. Embretsen
Added new tests info_schema and signal_resignal to pb2gentest, and added basic "skip test" functionality. |
107 |
|
108 |
#
|
|
0.67.565
by John H. Embretsen
pb2gentest*: Automatically look for redefine file to match the given grammar file. If found, add --redefine=file to RQG command line. Also: |
109 |
# Looks for a file name with the same name as the grammar mentioned in the
|
110 |
# command line string, except with a "_redefine.yy" suffix.
|
|
111 |
#
|
|
112 |
# The redefine file is expected to be in the same directory as the grammar
|
|
113 |
# itself, at least for now.
|
|
114 |
# If such a file is not found, undef is returned.
|
|
115 |
#
|
|
116 |
# Input: Command string including "--grammar=...".
|
|
117 |
# Output: Filename of redefine file, to be used with --redefine option.
|
|
118 |
# Returns undef if such a file is not found where expected.
|
|
119 |
#
|
|
120 |
sub redefine_filename ($){ |
|
121 |
# Steps:
|
|
122 |
# 1. Find out the grammar file name.
|
|
123 |
# 2. Construct the expected redefine file name
|
|
124 |
# (replacing ".yy" with "_redefine.yy").
|
|
125 |
# 3. Check if the redefine file exists.
|
|
126 |
# 4. Return the redefine file name, or undef.
|
|
127 |
#
|
|
128 |
my $command_string = @_[0]; |
|
129 |
if ($command_string =~ /(--grammar)=(.+)\s/m) { |
|
130 |
my $grammar_filename = $2; |
|
131 |
my $redefine_filename = $grammar_filename; |
|
132 |
$redefine_filename =~ s/\.yy/_redefine\.yy/; |
|
133 |
if (-e $redefine_filename) { |
|
134 |
say("Using redefine file ".$redefine_filename."."); |
|
135 |
print_special_comments($redefine_filename); |
|
136 |
return $redefine_filename; |
|
137 |
} else { |
|
138 |
say("No redefine file found for grammar ".$grammar_filename."."); |
|
139 |
print_special_comments($grammar_filename); |
|
140 |
return undef; |
|
141 |
}
|
|
142 |
} else { |
|
143 |
croak("redefine_filename: Option --grammar not found in command. Command is: $command_string"); |
|
144 |
}
|
|
145 |
}
|
|
146 |
||
147 |
#
|
|
148 |
# Looks in a file for comments of a certain format and prints them to standard
|
|
149 |
# output with some cruft to separate it from other output.
|
|
150 |
#
|
|
151 |
# Input: Filename (path)
|
|
152 |
#
|
|
153 |
sub print_special_comments ($){ |
|
154 |
# Corresponding Unix command: grep '.*\(WL#\|Bug#\|Disabled\).*' grammar_file_redefine.yy
|
|
155 |
||
156 |
my $filename = @_[0]; |
|
157 |
my $pattern = "# +(WL#|Bug#|Disabled).*"; |
|
0.67.567
by John H. Embretsen
pb2gentest: Add blank line before new entries in special comments that are printed to output. |
158 |
my $pattern_new_entry = "# +(WL#|Bug#).+"; |
159 |
# We assume that "Disabled" always comes after "Bug#" or "WL#" in files with
|
|
160 |
# special comments with agreed structure. So in a line that matches the
|
|
161 |
# first pattern we look for indicators of a new entry by using
|
|
162 |
# $pattern_new_entry (see below).
|
|
0.67.565
by John H. Embretsen
pb2gentest*: Automatically look for redefine file to match the given grammar file. If found, add --redefine=file to RQG command line. Also: |
163 |
|
164 |
say("Looking for special comments in grammar or redefine file..."); |
|
165 |
say("Using pattern: ".$pattern); |
|
166 |
say("\n#### SPECIAL COMMENTS IN FILE $filename: ####"); |
|
167 |
say(); |
|
168 |
open FILE, "$filename" or croak("Unable to open file $filename"); |
|
169 |
my $line; |
|
170 |
while ( <FILE> ) { |
|
171 |
$line = trim($_); |
|
172 |
if ($line =~ m{$pattern}) { |
|
0.67.567
by John H. Embretsen
pb2gentest: Add blank line before new entries in special comments that are printed to output. |
173 |
# Add a blank line before all new entries, so that it is easier to
|
174 |
# distinguish separate entries in the test log.
|
|
175 |
if ($line =~ m{$pattern_new_entry}) { |
|
176 |
say("\n\t".$line); |
|
177 |
} else { |
|
178 |
say("\t".$line); |
|
179 |
}
|
|
0.67.565
by John H. Embretsen
pb2gentest*: Automatically look for redefine file to match the given grammar file. If found, add --redefine=file to RQG command line. Also: |
180 |
}
|
181 |
}
|
|
182 |
close FILE; |
|
183 |
say(""); |
|
184 |
say("#### END OF SPECIAL COMMENTS ####\n"); |
|
185 |
say(""); |
|
186 |
}
|
|
187 |
||
188 |
||
189 |
#
|
|
190 |
# Removes leading and trailing whitespace.
|
|
191 |
#
|
|
192 |
sub trim($) |
|
193 |
{
|
|
194 |
my $string = shift; |
|
195 |
$string =~ s/^\s+//; |
|
196 |
$string =~ s/\s+$//; |
|
197 |
return $string; |
|
198 |
}
|
|
199 |
||
200 |
||
201 |
#
|
|
0.67.79
by John H. Embretsen
pb2gentest: Enable rpl_semisync test on Windows, as support for this was recently added to replication development branches. |
202 |
# Skips the test, displays reason (argument to the routine) quasi-MTR-style and
|
203 |
# exits with exit code 0.
|
|
204 |
#
|
|
205 |
# Example usage:
|
|
206 |
# # This feature is not yet supported on Windows, so skip this test
|
|
207 |
# skip_test("This feature/test does not support the Windows platform at this time");
|
|
208 |
#
|
|
209 |
# will appear in output as:
|
|
210 |
# rpl_semisync [ skipped ] This feature/test does not support the Windows platform at this time
|
|
0.71.1
by John H. Embretsen
Added new tests info_schema and signal_resignal to pb2gentest, and added basic "skip test" functionality. |
211 |
#
|
212 |
sub skip_test { |
|
213 |
my $reason = @_[0]; |
|
214 |
my $message = "$test"; |
|
215 |
# Using MTR-style output for the readers' convenience.
|
|
216 |
# (at least 41 chars before "[ skipped ]")
|
|
217 |
while (length $message < 40) |
|
218 |
{
|
|
219 |
$message = $message.' '; |
|
220 |
}
|
|
0.67.74
by John H. Embretsen
pb2gentest.pl: Improved output/information when starting the script and adjusted pb2 database connection details. |
221 |
$message = $message." [ skipped ] ".$reason; |
0.71.1
by John H. Embretsen
Added new tests info_schema and signal_resignal to pb2gentest, and added basic "skip test" functionality. |
222 |
print "$message\n"; |
223 |
print localtime()." [$$] $0 will exit with exit status 0.\n"; |
|
224 |
POSIX::_exit (0); |
|
225 |
}
|
|
226 |
||
0.67.66
by John H. Embretsen
pb2gentest: Set MTR_BUILD_THREAD to avoid port number conflicts during parallel test runs on the same host. |
227 |
#
|
228 |
# Returns a random number between 1 and 499.
|
|
229 |
#
|
|
230 |
sub pick_random_port_range_id { |
|
231 |
my $prng = GenTest::Random->new( seed => time ); |
|
232 |
return $prng->uint16(1,499); |
|
233 |
}
|
|
234 |
||
235 |
#
|
|
0.89.1
by John H. Embretsen
Workaround for MySQL bug 48351: Support semisync plugin names both with and without 'lib'-prefix. With time only non-prefixed plugin name will be used. Also support other plugin dirs (release builds, sandbox builds etc) by doing recursive search for plugin files. First match wins. |
236 |
# Searches recursively for a given file name under the given directory.
|
237 |
# Default top search directory is $basedir.
|
|
238 |
#
|
|
239 |
# Arg1 (mandatory): file name (excluding path)
|
|
240 |
# Arg2 (optional) : directory where search will start
|
|
241 |
#
|
|
242 |
# Returns full path to the directory where the file resides, if found.
|
|
243 |
# If more than one matching file is found, the directory of the first one found
|
|
244 |
# in a depth-first search will be returned.
|
|
245 |
# Returns undef if none is found.
|
|
246 |
#
|
|
247 |
sub findDirectory { |
|
248 |
my ($plugin_name, $dir) = @_; |
|
249 |
if (not defined $plugin_name) { |
|
250 |
carp("File name required as argument to subroutine findDirectory()"); |
|
251 |
}
|
|
252 |
if (not defined $dir) { |
|
253 |
$dir = $basedir; |
|
254 |
}
|
|
255 |
my $fullPath; # the result |
|
256 |
find(sub { |
|
257 |
# This subroutine is called for each file and dir it finds.
|
|
258 |
# According to docs it does depth-first search.
|
|
259 |
if ($_ eq $plugin_name) { |
|
260 |
$fullPath = $File::Find::dir if not defined $fullPath; |
|
261 |
}
|
|
262 |
# any return value is ignored
|
|
263 |
}, $dir); |
|
264 |
return $fullPath; |
|
265 |
}
|
|
266 |
||
267 |
#
|
|
0.67.66
by John H. Embretsen
pb2gentest: Set MTR_BUILD_THREAD to avoid port number conflicts during parallel test runs on the same host. |
268 |
# Get the bzr branch ID from the pushbuild2 database (internal), based on the
|
269 |
# branch name ($tree variable).
|
|
270 |
#
|
|
271 |
# If the branch name (tree) is not found in the database, or we are unable to
|
|
272 |
# connect to the database, undef is returned.
|
|
273 |
#
|
|
274 |
sub get_pb2_branch_id { |
|
275 |
||
0.67.78
by John H. Embretsen
pb2gentest.pl: Disable pb2 db lookup of branch id (while working out perl module issues on certain platforms). Get from env var instead, if set. Adjust messages accordingly |
276 |
# First, check if the environment variable BRANCH_ID is set.
|
277 |
if (defined $ENV{BRANCH_ID}) { |
|
278 |
return $ENV{BRANCH_ID}; |
|
279 |
} else { |
|
280 |
# Disable db lookup for the time being due to issues on sparc32.
|
|
281 |
# Remove this "else" block to enable
|
|
282 |
return; |
|
283 |
}
|
|
0.67.74
by John H. Embretsen
pb2gentest.pl: Improved output/information when starting the script and adjusted pb2 database connection details. |
284 |
# Lookup by branch name. Get branch name from tree, which could be url.
|
285 |
my $branch_name = $tree; |
|
286 |
if ($tree =~ m{/}) { |
|
287 |
# Found '/', assuming tree is URL.
|
|
288 |
# Find last substring that is between a '/' and either end-of-string or a '/' followed by end of string.
|
|
289 |
$tree =~ m{.*/([^/]+)($|/$)}; |
|
290 |
$branch_name=$1; |
|
291 |
}
|
|
292 |
||
293 |
my $dsn_pb2 = 'dbi:mysql:host=trollheim.norway.sun.com:port=3306:user=readonly:database=pushbuild2'; |
|
294 |
my $SQL_getBranchId = "SELECT branch_id FROM branches WHERE branch_name = '$branch_name'"; |
|
295 |
||
0.99.27
by John H. Embretsen
Use say() instead of print() where we can, to get a uniform prefix for all chatter (PB2 scripts). Almost all remaining prints are nedded to conform with current external (PB2) log parsers. |
296 |
say("Using branch name $branch_name\n"); |
297 |
say("Trying to connect to pushbuild2 database...\n"); |
|
0.67.66
by John H. Embretsen
pb2gentest: Set MTR_BUILD_THREAD to avoid port number conflicts during parallel test runs on the same host. |
298 |
|
299 |
my $dbh = DBI->connect($dsn_pb2, undef, undef, { |
|
0.67.74
by John H. Embretsen
pb2gentest.pl: Improved output/information when starting the script and adjusted pb2 database connection details. |
300 |
mysql_connect_timeout => 5, |
301 |
PrintError => 0, |
|
0.67.66
by John H. Embretsen
pb2gentest: Set MTR_BUILD_THREAD to avoid port number conflicts during parallel test runs on the same host. |
302 |
RaiseError => 0, |
303 |
AutoCommit => 0, |
|
304 |
} ); |
|
305 |
||
306 |
if (not defined $dbh) { |
|
0.99.27
by John H. Embretsen
Use say() instead of print() where we can, to get a uniform prefix for all chatter (PB2 scripts). Almost all remaining prints are nedded to conform with current external (PB2) log parsers. |
307 |
say("connect() to pushbuild2 database failed: ".$DBI::errstr."\n"); |
0.67.66
by John H. Embretsen
pb2gentest: Set MTR_BUILD_THREAD to avoid port number conflicts during parallel test runs on the same host. |
308 |
return; |
309 |
}
|
|
310 |
||
311 |
my $id = $dbh->selectrow_array($SQL_getBranchId); |
|
312 |
$dbh->disconnect; |
|
313 |
return $id; |
|
314 |
}
|
|
315 |
||
316 |
#### end subroutines ###########################################################
|
|
317 |
||
0.67.387
by John H. Embretsen
pb2gentest: Display user name before running test. To ease debugging in a non-uniform deployment environment. |
318 |
# Find out active user name and mention it in the output to ease debugging.
|
319 |
my $username; |
|
320 |
if (osLinux() || osSolaris()) { |
|
321 |
$username = $ENV{'LOGNAME'}; |
|
322 |
} else { |
|
323 |
$username = $ENV{'USERNAME'}; |
|
324 |
}
|
|
325 |
||
0.67.16
by John H. Embretsen
Update paths in PB2 scripts, having modified PB2 host setup to use the randgen branch on Launchpad. |
326 |
chdir('randgen'); |
0.67.1
by Philip Stoev
initial import from internal tree |
327 |
|
0.67.398
by John H. Embretsen
Start using BzrInfo module for reporting versions to screen and XML reports. |
328 |
say("Gathering info from the environment..."); |
329 |
# calling bzr usually takes a few seconds...
|
|
330 |
my $bzrinfo = GenTest::BzrInfo->new( |
|
331 |
dir => cwd() |
|
332 |
);
|
|
333 |
||
0.99.27
by John H. Embretsen
Use say() instead of print() where we can, to get a uniform prefix for all chatter (PB2 scripts). Almost all remaining prints are nedded to conform with current external (PB2) log parsers. |
334 |
say("===== Information on the host system: =====\n"); |
335 |
say(" - Local time : ".localtime()."\n"); |
|
336 |
say(" - Hostname : ".hostname()."\n"); |
|
0.67.387
by John H. Embretsen
pb2gentest: Display user name before running test. To ease debugging in a non-uniform deployment environment. |
337 |
say(" - Username : ".$username."\n"); |
0.99.27
by John H. Embretsen
Use say() instead of print() where we can, to get a uniform prefix for all chatter (PB2 scripts). Almost all remaining prints are nedded to conform with current external (PB2) log parsers. |
338 |
say(" - PID : $$\n"); |
339 |
say(" - Working dir : ".cwd()."\n"); |
|
340 |
say(" - PATH : ".$ENV{'PATH'}."\n"); |
|
341 |
say(" - Script arguments:\n"); |
|
342 |
say(" basedir = $basedir\n"); |
|
343 |
say(" vardir = $vardir\n"); |
|
344 |
say(" tree = $tree\n"); |
|
345 |
say(" test = $test\n"); |
|
346 |
say("\n"); |
|
0.67.398
by John H. Embretsen
Start using BzrInfo module for reporting versions to screen and XML reports. |
347 |
say("===== Information on the tested binaries (PB2): =====\n"); |
348 |
say(" - Branch URL : ".$ENV{'BRANCH_SOURCE'}); |
|
349 |
say(" - Branch name : ".$ENV{'BRANCH_NAME'}); |
|
350 |
say(" - Revision : ".$ENV{'PUSH_REVISION'}); |
|
351 |
say(" - Source : ".$ENV{'SOURCE'}); |
|
0.99.27
by John H. Embretsen
Use say() instead of print() where we can, to get a uniform prefix for all chatter (PB2 scripts). Almost all remaining prints are nedded to conform with current external (PB2) log parsers. |
352 |
say("===== Information on Random Query Generator version (bzr): =====\n"); |
0.67.398
by John H. Embretsen
Start using BzrInfo module for reporting versions to screen and XML reports. |
353 |
say(" - Date (rev) : ".$bzrinfo->bzrDate()); |
0.67.411
by John H. Embretsen
pb2gentest: Some cosmetic printout fixes. |
354 |
#say(" - Date (now) : ".$bzrinfo->bzrBuildDate()); # Shows current date, we already have that.
|
0.67.398
by John H. Embretsen
Start using BzrInfo module for reporting versions to screen and XML reports. |
355 |
say(" - Revno : ".$bzrinfo->bzrRevno()); |
356 |
say(" - Revision ID : ".$bzrinfo->bzrRevisionId()); |
|
357 |
say(" - Branch nick : ".$bzrinfo->bzrBranchNick()); |
|
358 |
say(" - Clean copy? : ". ($bzrinfo->bzrClean()? "Yes" : "No")); |
|
0.99.27
by John H. Embretsen
Use say() instead of print() where we can, to get a uniform prefix for all chatter (PB2 scripts). Almost all remaining prints are nedded to conform with current external (PB2) log parsers. |
359 |
say("\n"); |
0.67.1
by Philip Stoev
initial import from internal tree |
360 |
|
0.67.116
by John H. Embretsen
pb2gentest: Support "rqg_" prefix in test names. If it is there, strip it off before processing further. |
361 |
# Test name:
|
362 |
# In PB2, tests run via this script are prefixed with "rqg_" so that it is
|
|
363 |
# easy to distinguish these tests from other "external" tests.
|
|
364 |
# For a while we will support test names both with and without the prefix.
|
|
365 |
# For this reason we strip off the "rqg_" prefix before continuing.
|
|
366 |
# This also means that you cannot try to match against "rqg_" prefix in test
|
|
367 |
# "definitions" (if statements) below.
|
|
0.67.124
by John H. Embretsen
pb2gentest: Simple MTR-style reporting of test results, for xref and PB2 (pass/fail only, no signature support yet). |
368 |
my $test_name = $test; |
369 |
my $test_suite_name = 'serverqa'; # used for xref reporting |
|
370 |
$test =~ s/^rqg_//; # test_name without prefix |
|
0.67.116
by John H. Embretsen
pb2gentest: Support "rqg_" prefix in test names. If it is there, strip it off before processing further. |
371 |
|
0.67.66
by John H. Embretsen
pb2gentest: Set MTR_BUILD_THREAD to avoid port number conflicts during parallel test runs on the same host. |
372 |
# Server port numbers:
|
373 |
#
|
|
0.67.212
by John H. Embretsen
pb2gentest: No longer set MTR_BUILD_THREAD unless specified by user. Our PB2 hosts should run Cat most 1 test at a time. |
374 |
# If several instances of this script may run at the same time on the same
|
375 |
# host, port number conflicts may occur.
|
|
376 |
#
|
|
377 |
# If needed, use use a port range ID (integer) that is unique for this host at
|
|
378 |
# this time.
|
|
0.67.66
by John H. Embretsen
pb2gentest: Set MTR_BUILD_THREAD to avoid port number conflicts during parallel test runs on the same host. |
379 |
# This ID is used by the RQG framework to designate a port range to use for the
|
380 |
# test run. Passed to RQG using the MTR_BUILD_THREAD environment variable
|
|
381 |
# (this naming is a legacy from MTR, which is used by RQG to start the MySQL
|
|
382 |
# server).
|
|
383 |
#
|
|
384 |
# Solution: Use unique port range id per branch. Use "branch_id" as recorded
|
|
385 |
# in PB2 database (guaranteed unique per branch).
|
|
386 |
# Potential issue 1: Unable to connect to pb2 database.
|
|
387 |
# Solution 1: Pick a random ID between 1 and some sensible number (e.g. 500).
|
|
388 |
# Potential issue 2: Clashing resources when running multiple pushes in same branch?
|
|
389 |
# Potential solution 2: Keep track of used ids in local file(s). Pick unused id.
|
|
390 |
# (not implemented yet)
|
|
0.67.212
by John H. Embretsen
pb2gentest: No longer set MTR_BUILD_THREAD unless specified by user. Our PB2 hosts should run Cat most 1 test at a time. |
391 |
#
|
392 |
# Currently (December 2009) PB2 RQG host should be running only one test at a
|
|
393 |
# time, so this should not be an issue, hence no need to set MTR_BUILD_THREAD.
|
|
394 |
||
395 |
#print("===== Determining port base id: =====\n");
|
|
0.67.66
by John H. Embretsen
pb2gentest: Set MTR_BUILD_THREAD to avoid port number conflicts during parallel test runs on the same host. |
396 |
my $port_range_id; # Corresponding to MTR_BUILD_THREAD in the MySQL MTR world. |
0.67.212
by John H. Embretsen
pb2gentest: No longer set MTR_BUILD_THREAD unless specified by user. Our PB2 hosts should run Cat most 1 test at a time. |
397 |
# First, see if user has supplied us with a value for MTR_BUILD_THREAD:
|
0.67.83
by John H. Embretsen
pb2gentest: Do not pick a port base ID if MTR_BUILD_THREAD is already set by user. This allows the user to control which ports will be used. |
398 |
$port_range_id = $ENV{MTR_BUILD_THREAD}; |
399 |
if (defined $port_range_id) { |
|
0.99.27
by John H. Embretsen
Use say() instead of print() where we can, to get a uniform prefix for all chatter (PB2 scripts). Almost all remaining prints are nedded to conform with current external (PB2) log parsers. |
400 |
say("Environment variable MTR_BUILD_THREAD was already set.\n"); |
0.67.66
by John H. Embretsen
pb2gentest: Set MTR_BUILD_THREAD to avoid port number conflicts during parallel test runs on the same host. |
401 |
}
|
0.67.212
by John H. Embretsen
pb2gentest: No longer set MTR_BUILD_THREAD unless specified by user. Our PB2 hosts should run Cat most 1 test at a time. |
402 |
#else {
|
403 |
# # try to obtain branch id, somehow
|
|
404 |
# $port_range_id = get_pb2_branch_id();
|
|
405 |
# if (not defined $port_range_id) {
|
|
406 |
# print("Unable to get branch id. Picking a 'random' port base id...\n");
|
|
407 |
# $port_range_id = pick_random_port_range_id();
|
|
408 |
# } else {
|
|
409 |
# print("Using pb2 branch ID as port base ID.\n");
|
|
410 |
# }
|
|
411 |
#}
|
|
0.67.74
by John H. Embretsen
pb2gentest.pl: Improved output/information when starting the script and adjusted pb2 database connection details. |
412 |
|
0.67.565
by John H. Embretsen
pb2gentest*: Automatically look for redefine file to match the given grammar file. If found, add --redefine=file to RQG command line. Also: |
413 |
say("Configuring test..."); |
414 |
say(""); |
|
0.67.66
by John H. Embretsen
pb2gentest: Set MTR_BUILD_THREAD to avoid port number conflicts during parallel test runs on the same host. |
415 |
|
0.67.420
by John H. Embretsen
pb2gentest: Do not set --loose-log-output option when testing MySQL 5.0.x, otherwise the server will refuse to start. |
416 |
# Guess MySQL version. Some options we set later depend on this.
|
417 |
my $version50 = 0; # 1 if 5.0.x, 0 otherwise. |
|
418 |
if( ($ENV{'BRANCH_SOURCE'} =~ m{-5\.0}io) || ($basedir =~ m{-5\.0}io) ) { |
|
419 |
say("Detected version 5.0.x, adjusting server options accordingly."); |
|
420 |
$version50 = 1; |
|
421 |
}
|
|
422 |
||
0.67.1
by Philip Stoev
initial import from internal tree |
423 |
my $cwd = cwd(); |
424 |
||
425 |
my $command; |
|
426 |
my $engine; |
|
427 |
my $rpl_mode; |
|
428 |
||
429 |
if (($engine) = $test =~ m{(maria|falcon|innodb|myisam|pbxt)}io) { |
|
0.67.411
by John H. Embretsen
pb2gentest: Some cosmetic printout fixes. |
430 |
say("Detected that this test is about the $engine engine."); |
0.67.1
by Philip Stoev
initial import from internal tree |
431 |
}
|
432 |
||
433 |
if (($rpl_mode) = $test =~ m{(rbr|sbr|mbr|statement|mixed|row)}io) { |
|
0.67.411
by John H. Embretsen
pb2gentest: Some cosmetic printout fixes. |
434 |
say("Detected that this test is about replication mode $rpl_mode."); |
0.67.1
by Philip Stoev
initial import from internal tree |
435 |
$rpl_mode = 'mixed' if $rpl_mode eq 'mbr'; |
436 |
$rpl_mode = 'statement' if $rpl_mode eq 'sbr'; |
|
437 |
$rpl_mode = 'row' if $rpl_mode eq 'rbr'; |
|
438 |
}
|
|
439 |
||
0.71.1
by John H. Embretsen
Added new tests info_schema and signal_resignal to pb2gentest, and added basic "skip test" functionality. |
440 |
#
|
441 |
# Start defining tests. Test name can be whatever matches the regex in the if().
|
|
442 |
# TODO: Define less ambiguous test names to avoid accidental misconfiguration.
|
|
0.67.84
by John H. Embretsen
pb2gentest: Made test configurations that support or are used for the Falcon engine only trigger only if falcon is mentioned in test name. Otherwise this may interfere with other tests for other features. This should make myisam_blob_recovery work (used to fail due to unknown falcon option being specified). Also moved multi-engine or engine independent tests closer together. |
443 |
#
|
0.71.1
by John H. Embretsen
Added new tests info_schema and signal_resignal to pb2gentest, and added basic "skip test" functionality. |
444 |
# Starting out with "legacy" Falcon tests.
|
445 |
#
|
|
0.67.84
by John H. Embretsen
pb2gentest: Made test configurations that support or are used for the Falcon engine only trigger only if falcon is mentioned in test name. Otherwise this may interfere with other tests for other features. This should make myisam_blob_recovery work (used to fail due to unknown falcon option being specified). Also moved multi-engine or engine independent tests closer together. |
446 |
if ($test =~ m{falcon_.*transactions}io ) { |
0.67.1
by Philip Stoev
initial import from internal tree |
447 |
$command = ' |
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
448 |
--grammar='.$conf.'/transactions/transactions.yy |
449 |
--gendata='.$conf.'/transactions/transactions.zz |
|
0.67.1
by Philip Stoev
initial import from internal tree |
450 |
--mysqld=--falcon-consistent-read=1
|
451 |
--mysqld=--transaction-isolation=REPEATABLE-READ
|
|
452 |
--validator=DatabaseConsistency
|
|
453 |
--mem
|
|
454 |
'; |
|
0.67.84
by John H. Embretsen
pb2gentest: Made test configurations that support or are used for the Falcon engine only trigger only if falcon is mentioned in test name. Otherwise this may interfere with other tests for other features. This should make myisam_blob_recovery work (used to fail due to unknown falcon option being specified). Also moved multi-engine or engine independent tests closer together. |
455 |
} elsif ($test =~ m{falcon_.*durability}io ) { |
0.67.1
by Philip Stoev
initial import from internal tree |
456 |
$command = ' |
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
457 |
--grammar='.$conf.'/transactions/transaction_durability.yy |
0.67.1
by Philip Stoev
initial import from internal tree |
458 |
--vardir1='.$vardir.'/vardir-'.$engine.' |
459 |
--vardir2='.$vardir.'/vardir-innodb |
|
460 |
--mysqld=--default-storage-engine='.$engine.' |
|
461 |
--mysqld=--falcon-checkpoint-schedule=\'1 1 1 1 1\'
|
|
462 |
--mysqld2=--default-storage-engine=Innodb
|
|
463 |
--validator=ResultsetComparator
|
|
464 |
'; |
|
0.67.84
by John H. Embretsen
pb2gentest: Made test configurations that support or are used for the Falcon engine only trigger only if falcon is mentioned in test name. Otherwise this may interfere with other tests for other features. This should make myisam_blob_recovery work (used to fail due to unknown falcon option being specified). Also moved multi-engine or engine independent tests closer together. |
465 |
} elsif ($test =~ m{falcon_repeatable_read}io ) { |
0.67.1
by Philip Stoev
initial import from internal tree |
466 |
$command = ' |
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
467 |
--grammar='.$conf.'/transactions/repeatable_read.yy |
468 |
--gendata='.$conf.'/transactions/transactions.zz |
|
0.67.1
by Philip Stoev
initial import from internal tree |
469 |
--mysqld=--falcon-consistent-read=1
|
470 |
--mysqld=--transaction-isolation=REPEATABLE-READ
|
|
471 |
--validator=RepeatableRead
|
|
472 |
--mysqld=--falcon-consistent-read=1
|
|
473 |
--mem
|
|
474 |
'; |
|
0.67.84
by John H. Embretsen
pb2gentest: Made test configurations that support or are used for the Falcon engine only trigger only if falcon is mentioned in test name. Otherwise this may interfere with other tests for other features. This should make myisam_blob_recovery work (used to fail due to unknown falcon option being specified). Also moved multi-engine or engine independent tests closer together. |
475 |
} elsif ($test =~ m{falcon_chill_thaw_compare}io) { |
0.67.1
by Philip Stoev
initial import from internal tree |
476 |
$command = ' |
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
477 |
--grammar='.$conf.'/engines/falcon/falcon_chill_thaw.yy |
478 |
--gendata='.$conf.'/engines/falcon/falcon_chill_thaw.zz |
|
0.67.1
by Philip Stoev
initial import from internal tree |
479 |
--mysqld=--falcon-record-chill-threshold=1K
|
480 |
--mysqld=--falcon-index-chill-threshold=1K
|
|
481 |
--threads=1
|
|
482 |
--vardir1='.$vardir.'/chillthaw-vardir |
|
483 |
--vardir2='.$vardir.'/default-vardir |
|
484 |
--reporters=Deadlock,ErrorLog,Backtrace
|
|
485 |
'; |
|
0.67.84
by John H. Embretsen
pb2gentest: Made test configurations that support or are used for the Falcon engine only trigger only if falcon is mentioned in test name. Otherwise this may interfere with other tests for other features. This should make myisam_blob_recovery work (used to fail due to unknown falcon option being specified). Also moved multi-engine or engine independent tests closer together. |
486 |
} elsif ($test =~ m{falcon_chill_thaw}io) { |
0.67.1
by Philip Stoev
initial import from internal tree |
487 |
$command = ' |
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
488 |
--grammar='.$conf.'/engines/falcon/falcon_chill_thaw.yy |
0.67.1
by Philip Stoev
initial import from internal tree |
489 |
--mysqld=--falcon-index-chill-threshold=4K
|
490 |
--mysqld=--falcon-record-chill-threshold=4K
|
|
491 |
'; |
|
0.67.84
by John H. Embretsen
pb2gentest: Made test configurations that support or are used for the Falcon engine only trigger only if falcon is mentioned in test name. Otherwise this may interfere with other tests for other features. This should make myisam_blob_recovery work (used to fail due to unknown falcon option being specified). Also moved multi-engine or engine independent tests closer together. |
492 |
} elsif ($test =~ m{falcon_online_alter}io) { |
0.67.1
by Philip Stoev
initial import from internal tree |
493 |
$command = ' |
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
494 |
--grammar='.$conf.'/engines/falcon/falcon_online_alter.yy |
0.67.1
by Philip Stoev
initial import from internal tree |
495 |
'; |
0.67.84
by John H. Embretsen
pb2gentest: Made test configurations that support or are used for the Falcon engine only trigger only if falcon is mentioned in test name. Otherwise this may interfere with other tests for other features. This should make myisam_blob_recovery work (used to fail due to unknown falcon option being specified). Also moved multi-engine or engine independent tests closer together. |
496 |
} elsif ($test =~ m{falcon_ddl}io) { |
0.67.1
by Philip Stoev
initial import from internal tree |
497 |
$command = ' |
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
498 |
--grammar='.$conf.'/engines/falcon/falcon_ddl.yy |
0.67.1
by Philip Stoev
initial import from internal tree |
499 |
'; |
0.67.84
by John H. Embretsen
pb2gentest: Made test configurations that support or are used for the Falcon engine only trigger only if falcon is mentioned in test name. Otherwise this may interfere with other tests for other features. This should make myisam_blob_recovery work (used to fail due to unknown falcon option being specified). Also moved multi-engine or engine independent tests closer together. |
500 |
} elsif ($test =~ m{falcon_limit_compare_self}io ) { |
0.67.1
by Philip Stoev
initial import from internal tree |
501 |
$command = ' |
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
502 |
--grammar='.$conf.'/engines/falcon/falcon_nolimit.yy |
0.67.1
by Philip Stoev
initial import from internal tree |
503 |
--threads=1
|
504 |
--validator=Limit
|
|
505 |
'; |
|
0.67.84
by John H. Embretsen
pb2gentest: Made test configurations that support or are used for the Falcon engine only trigger only if falcon is mentioned in test name. Otherwise this may interfere with other tests for other features. This should make myisam_blob_recovery work (used to fail due to unknown falcon option being specified). Also moved multi-engine or engine independent tests closer together. |
506 |
} elsif ($test =~ m{falcon_limit_compare_innodb}io ) { |
0.67.1
by Philip Stoev
initial import from internal tree |
507 |
$command = ' |
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
508 |
--grammar='.$conf.'/engines/falcon/limit_compare.yy |
0.67.1
by Philip Stoev
initial import from internal tree |
509 |
--vardir1='.$vardir.'/vardir-falcon |
510 |
--vardir2='.$vardir.'/vardir-innodb |
|
511 |
--mysqld=--default-storage-engine=Falcon
|
|
512 |
--mysqld2=--default-storage-engine=Innodb
|
|
513 |
--threads=1
|
|
514 |
--reporters=
|
|
515 |
'; |
|
0.67.84
by John H. Embretsen
pb2gentest: Made test configurations that support or are used for the Falcon engine only trigger only if falcon is mentioned in test name. Otherwise this may interfere with other tests for other features. This should make myisam_blob_recovery work (used to fail due to unknown falcon option being specified). Also moved multi-engine or engine independent tests closer together. |
516 |
} elsif ($test =~ m{falcon_limit}io ) { |
0.67.1
by Philip Stoev
initial import from internal tree |
517 |
$command = ' |
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
518 |
--grammar='.$conf.'/engines/falcon/falcon_limit.yy |
0.67.1
by Philip Stoev
initial import from internal tree |
519 |
--mysqld=--loose-maria-pagecache-buffer-size=64M
|
520 |
'; |
|
0.67.84
by John H. Embretsen
pb2gentest: Made test configurations that support or are used for the Falcon engine only trigger only if falcon is mentioned in test name. Otherwise this may interfere with other tests for other features. This should make myisam_blob_recovery work (used to fail due to unknown falcon option being specified). Also moved multi-engine or engine independent tests closer together. |
521 |
} elsif ($test =~ m{falcon_recovery}io ) { |
0.67.1
by Philip Stoev
initial import from internal tree |
522 |
$command = ' |
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
523 |
--grammar='.$conf.'/engines/falcon/falcon_recovery.yy |
524 |
--gendata='.$conf.'/engines/falcon/falcon_recovery.zz |
|
0.67.1
by Philip Stoev
initial import from internal tree |
525 |
--mysqld=--falcon-checkpoint-schedule="1 1 1 1 1"
|
526 |
'; |
|
0.67.84
by John H. Embretsen
pb2gentest: Made test configurations that support or are used for the Falcon engine only trigger only if falcon is mentioned in test name. Otherwise this may interfere with other tests for other features. This should make myisam_blob_recovery work (used to fail due to unknown falcon option being specified). Also moved multi-engine or engine independent tests closer together. |
527 |
} elsif ($test =~ m{falcon_pagesize_32K}io ) { |
0.67.1
by Philip Stoev
initial import from internal tree |
528 |
$command = ' |
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
529 |
--grammar='.$conf.'/engines/falcon/falcon_pagesize.yy |
0.67.1
by Philip Stoev
initial import from internal tree |
530 |
--mysqld=--falcon-page-size=32K
|
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
531 |
--gendata='.$conf.'/engines/falcon/falcon_pagesize32K.zz |
0.67.1
by Philip Stoev
initial import from internal tree |
532 |
'; |
0.67.84
by John H. Embretsen
pb2gentest: Made test configurations that support or are used for the Falcon engine only trigger only if falcon is mentioned in test name. Otherwise this may interfere with other tests for other features. This should make myisam_blob_recovery work (used to fail due to unknown falcon option being specified). Also moved multi-engine or engine independent tests closer together. |
533 |
} elsif ($test =~ m{falcon_pagesize_2K}io) { |
0.67.1
by Philip Stoev
initial import from internal tree |
534 |
$command = ' |
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
535 |
--grammar='.$conf.'/engines/falcon/falcon_pagesize.yy |
0.67.1
by Philip Stoev
initial import from internal tree |
536 |
--mysqld=--falcon-page-size=2K
|
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
537 |
--gendata='.$conf.'/engines/falcon/falcon_pagesize2K.zz |
0.67.1
by Philip Stoev
initial import from internal tree |
538 |
'; |
0.67.84
by John H. Embretsen
pb2gentest: Made test configurations that support or are used for the Falcon engine only trigger only if falcon is mentioned in test name. Otherwise this may interfere with other tests for other features. This should make myisam_blob_recovery work (used to fail due to unknown falcon option being specified). Also moved multi-engine or engine independent tests closer together. |
539 |
} elsif ($test =~ m{falcon_select_autocommit}io) { |
0.67.1
by Philip Stoev
initial import from internal tree |
540 |
$command = ' |
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
541 |
--grammar='.$conf.'/engines/falcon/falcon_select_autocommit.yy |
0.67.1
by Philip Stoev
initial import from internal tree |
542 |
--queries=10000000
|
543 |
'; |
|
0.67.84
by John H. Embretsen
pb2gentest: Made test configurations that support or are used for the Falcon engine only trigger only if falcon is mentioned in test name. Otherwise this may interfere with other tests for other features. This should make myisam_blob_recovery work (used to fail due to unknown falcon option being specified). Also moved multi-engine or engine independent tests closer together. |
544 |
} elsif ($test =~ m{falcon_backlog}io ) { |
0.67.1
by Philip Stoev
initial import from internal tree |
545 |
$command = ' |
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
546 |
--grammar='.$conf.'/engines/falcon/falcon_backlog.yy |
547 |
--gendata='.$conf.'/engines/falcon/falcon_backlog.zz |
|
0.67.1
by Philip Stoev
initial import from internal tree |
548 |
--mysqld=--transaction-isolation=REPEATABLE-READ
|
549 |
--mysqld=--falcon-record-memory-max=10M
|
|
550 |
--mysqld=--falcon-record-chill-threshold=1K
|
|
551 |
--mysqld=--falcon-page-cache-size=128M
|
|
552 |
'; |
|
553 |
} elsif ($test =~ m{falcon_compare_innodb}io ) { |
|
554 |
# Datatypes YEAR and TIME disabled in grammars due to Bug#45499 (InnoDB).
|
|
555 |
# Revert to falcon_data_types.{yy|zz} when that bug is resolved in relevant branches.
|
|
556 |
$command = ' |
|
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
557 |
--grammar='.$conf.'/engines/falcon/falcon_data_types_no_year_time.yy |
558 |
--gendata='.$conf.'/engines/falcon/falcon_data_types_no_year_time.zz |
|
0.67.1
by Philip Stoev
initial import from internal tree |
559 |
--vardir1='.$vardir.'/vardir-falcon |
560 |
--vardir2='.$vardir.'/vardir-innodb |
|
561 |
--mysqld=--default-storage-engine=Falcon
|
|
562 |
--mysqld2=--default-storage-engine=Innodb
|
|
563 |
--threads=1
|
|
564 |
--reporters=
|
|
565 |
'; |
|
0.67.290
by John H. Embretsen
pb2gentest: Disable compare_self testing against InnoDB, MyISAM, as this test makes most sense to run against more unstable, 'broken' storage engines. |
566 |
} elsif ($test =~ m{falcon_compare_self}io ) { |
0.67.238
by John H. Embretsen
pb2gentest: Enable 'compare_self' (datatypes) test also for other engines (myisam, innodb) than falcon. |
567 |
$command = ' |
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
568 |
--grammar='.$conf.'/engines/falcon/falcon_data_types.yy |
569 |
--gendata='.$conf.'/engines/falcon/falcon_data_types.zz |
|
0.67.238
by John H. Embretsen
pb2gentest: Enable 'compare_self' (datatypes) test also for other engines (myisam, innodb) than falcon. |
570 |
--vardir1='.$vardir.'/'.$engine.'-vardir1 |
571 |
--vardir2='.$vardir.'/'.$engine.'-vardir2 |
|
572 |
--threads=1
|
|
573 |
--reporters=
|
|
574 |
'; |
|
0.67.290
by John H. Embretsen
pb2gentest: Disable compare_self testing against InnoDB, MyISAM, as this test makes most sense to run against more unstable, 'broken' storage engines. |
575 |
#
|
576 |
# END OF FALCON-ONLY TESTS
|
|
577 |
#
|
|
0.67.236
by John H. Embretsen
pb2gentest: Add configuration for innodb_repeatable_read test (based on existing falcon equivalent). |
578 |
} elsif ($test =~ m{innodb_repeatable_read}io ) { |
579 |
# Transactional test. See also falcon_repeatable_read.
|
|
580 |
$command = ' |
|
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
581 |
--grammar='.$conf.'/transactions/repeatable_read.yy |
582 |
--gendata='.$conf.'/transactions/transactions.zz |
|
0.67.236
by John H. Embretsen
pb2gentest: Add configuration for innodb_repeatable_read test (based on existing falcon equivalent). |
583 |
--mysqld=--transaction-isolation=REPEATABLE-READ
|
584 |
--validator=RepeatableRead
|
|
585 |
'; |
|
0.67.84
by John H. Embretsen
pb2gentest: Made test configurations that support or are used for the Falcon engine only trigger only if falcon is mentioned in test name. Otherwise this may interfere with other tests for other features. This should make myisam_blob_recovery work (used to fail due to unknown falcon option being specified). Also moved multi-engine or engine independent tests closer together. |
586 |
} elsif ($test =~ m{(falcon|myisam)_blob_recovery}io ) { |
587 |
$command = ' |
|
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
588 |
--grammar='.$conf.'/engines/falcon/falcon_blobs.yy |
589 |
--gendata='.$conf.'/engines/falcon/falcon_blobs.zz |
|
0.67.84
by John H. Embretsen
pb2gentest: Made test configurations that support or are used for the Falcon engine only trigger only if falcon is mentioned in test name. Otherwise this may interfere with other tests for other features. This should make myisam_blob_recovery work (used to fail due to unknown falcon option being specified). Also moved multi-engine or engine independent tests closer together. |
590 |
--duration=130
|
591 |
--threads=1
|
|
0.67.88
by John H. Embretsen
pb2gentest: Use Recovery reporter in myisam_blob_recovery test (this was a regression caused by a previous change). |
592 |
--reporters=Deadlock,ErrorLog,Backtrace,Recovery,Shutdown
|
0.67.84
by John H. Embretsen
pb2gentest: Made test configurations that support or are used for the Falcon engine only trigger only if falcon is mentioned in test name. Otherwise this may interfere with other tests for other features. This should make myisam_blob_recovery work (used to fail due to unknown falcon option being specified). Also moved multi-engine or engine independent tests closer together. |
593 |
'; |
594 |
if ($test =~ m{falcon}io) { |
|
595 |
# this option works with Falcon-enabled builds only
|
|
596 |
$command = $command.' |
|
597 |
--mysqld=--falcon-page-cache-size=128M
|
|
598 |
'; |
|
599 |
}
|
|
0.67.227
by John H. Embretsen
many_indexes: Temporarily disable use of UTF16 until WL#1213 is pushed to non-falcon branches. Add support for innodb and myisam engines in pb2gentest. |
600 |
} elsif ($test =~ m{(falcon|innodb|myisam)_many_indexes}io ) { |
0.67.84
by John H. Embretsen
pb2gentest: Made test configurations that support or are used for the Falcon engine only trigger only if falcon is mentioned in test name. Otherwise this may interfere with other tests for other features. This should make myisam_blob_recovery work (used to fail due to unknown falcon option being specified). Also moved multi-engine or engine independent tests closer together. |
601 |
$command = ' |
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
602 |
--grammar='.$conf.'/engines/many_indexes.yy |
603 |
--gendata='.$conf.'/engines/many_indexes.zz |
|
0.67.84
by John H. Embretsen
pb2gentest: Made test configurations that support or are used for the Falcon engine only trigger only if falcon is mentioned in test name. Otherwise this may interfere with other tests for other features. This should make myisam_blob_recovery work (used to fail due to unknown falcon option being specified). Also moved multi-engine or engine independent tests closer together. |
604 |
'; |
0.67.224
by John H. Embretsen
pb2gentest: Explicitly add support for innodb and myisam engines for test using falcon_tiny_inserts grammar. |
605 |
} elsif ($test =~ m{(falcon|innodb|myisam)_tiny_inserts}io) { |
0.67.84
by John H. Embretsen
pb2gentest: Made test configurations that support or are used for the Falcon engine only trigger only if falcon is mentioned in test name. Otherwise this may interfere with other tests for other features. This should make myisam_blob_recovery work (used to fail due to unknown falcon option being specified). Also moved multi-engine or engine independent tests closer together. |
606 |
$command = ' |
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
607 |
--gendata='.$conf.'/engines/tiny_inserts.zz |
608 |
--grammar='.$conf.'/engines/tiny_inserts.yy |
|
0.67.84
by John H. Embretsen
pb2gentest: Made test configurations that support or are used for the Falcon engine only trigger only if falcon is mentioned in test name. Otherwise this may interfere with other tests for other features. This should make myisam_blob_recovery work (used to fail due to unknown falcon option being specified). Also moved multi-engine or engine independent tests closer together. |
609 |
--queries=10000000
|
610 |
'; |
|
0.67.231
by John H. Embretsen
pb2gentest: Definition for rqg_innodb_transactions test. |
611 |
} elsif ($test =~ m{innodb_transactions}io) { |
612 |
$command = ' |
|
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
613 |
--grammar='.$conf.'/transactions/transactions.yy |
614 |
--gendata='.$conf.'/transactions/transactions.zz |
|
0.67.231
by John H. Embretsen
pb2gentest: Definition for rqg_innodb_transactions test. |
615 |
--mysqld=--transaction-isolation=REPEATABLE-READ
|
616 |
--validator=DatabaseConsistency
|
|
617 |
'; |
|
0.71.1
by John H. Embretsen
Added new tests info_schema and signal_resignal to pb2gentest, and added basic "skip test" functionality. |
618 |
#
|
0.67.224
by John H. Embretsen
pb2gentest: Explicitly add support for innodb and myisam engines for test using falcon_tiny_inserts grammar. |
619 |
# END OF STORAGE ENGINE TESTS
|
0.67.92
by John H. Embretsen
pb2gentest: Reorder (alphabetize) non-falcon test definitions for easier lookup. |
620 |
#
|
621 |
# Keep the following tests in alphabetical order (based on letters in regex)
|
|
622 |
# for easy lookup.
|
|
623 |
#
|
|
0.81.2
by John H. Embretsen
pb2gentest: Add --valgrind option to runall commands for tests which names include 'valgrind'. |
624 |
} elsif ($test =~ m{^backup_.*?_simple}io) { |
0.67.92
by John H. Embretsen
pb2gentest: Reorder (alphabetize) non-falcon test definitions for easier lookup. |
625 |
$command = ' |
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
626 |
--grammar='.$conf.'/backup/backup_simple.yy |
0.67.92
by John H. Embretsen
pb2gentest: Reorder (alphabetize) non-falcon test definitions for easier lookup. |
627 |
--reporters=Deadlock,ErrorLog,Backtrace
|
0.67.145
by John H. Embretsen
pb2gentest: Make sure backup feature is enabled for backup tests (add --mysql-bakcup option). Also add --innodb option to server command line if backup test is for InnoDB. |
628 |
--mysqld=--mysql-backup
|
0.67.92
by John H. Embretsen
pb2gentest: Reorder (alphabetize) non-falcon test definitions for easier lookup. |
629 |
'; |
0.81.2
by John H. Embretsen
pb2gentest: Add --valgrind option to runall commands for tests which names include 'valgrind'. |
630 |
} elsif ($test =~ m{^backup_.*?_consistency}io) { |
0.67.92
by John H. Embretsen
pb2gentest: Reorder (alphabetize) non-falcon test definitions for easier lookup. |
631 |
$command = ' |
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
632 |
--gendata='.$conf.'/backup/invariant.zz |
633 |
--grammar='.$conf.'/backup/invariant.yy |
|
0.67.92
by John H. Embretsen
pb2gentest: Reorder (alphabetize) non-falcon test definitions for easier lookup. |
634 |
--validator=Invariant
|
635 |
--reporters=Deadlock,ErrorLog,Backtrace,BackupAndRestoreInvariant,Shutdown
|
|
0.67.145
by John H. Embretsen
pb2gentest: Make sure backup feature is enabled for backup tests (add --mysql-bakcup option). Also add --innodb option to server command line if backup test is for InnoDB. |
636 |
--mysqld=--mysql-backup
|
0.67.92
by John H. Embretsen
pb2gentest: Reorder (alphabetize) non-falcon test definitions for easier lookup. |
637 |
--duration=600
|
638 |
--threads=25
|
|
639 |
'; |
|
640 |
} elsif ($test =~ m{dml_alter}io ) { |
|
641 |
$command = ' |
|
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
642 |
--gendata='.$conf.'/engines/maria/maria.zz |
643 |
--grammar='.$conf.'/engines/maria/maria_dml_alter.yy |
|
0.67.92
by John H. Embretsen
pb2gentest: Reorder (alphabetize) non-falcon test definitions for easier lookup. |
644 |
'; |
0.81.2
by John H. Embretsen
pb2gentest: Add --valgrind option to runall commands for tests which names include 'valgrind'. |
645 |
} elsif ($test =~ m{^info_schema}io ) { |
0.71.1
by John H. Embretsen
Added new tests info_schema and signal_resignal to pb2gentest, and added basic "skip test" functionality. |
646 |
$command = ' |
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
647 |
--grammar='.$conf.'/runtime/information_schema.yy |
0.72.1
by John H. Embretsen
pb2gentest: info_schema test should use 10 threads, not 100 (100 is overkill). |
648 |
--threads=10
|
0.71.1
by John H. Embretsen
Added new tests info_schema and signal_resignal to pb2gentest, and added basic "skip test" functionality. |
649 |
--duration=300
|
0.67.148
by Philip Stoev
better INFORMATION_SCHEMA test |
650 |
--mysqld=--log-output=file
|
0.71.1
by John H. Embretsen
Added new tests info_schema and signal_resignal to pb2gentest, and added basic "skip test" functionality. |
651 |
'; |
0.83.2
by John H. Embretsen
pb2gentest: Add mdl_stability test config. |
652 |
} elsif ($test =~ m{^mdl_stability}io ) { |
653 |
$command = ' |
|
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
654 |
--grammar='.$conf.'/runtime/metadata_stability.yy |
655 |
--gendata='.$conf.'/runtime/metadata_stability.zz |
|
0.83.2
by John H. Embretsen
pb2gentest: Add mdl_stability test config. |
656 |
--validator=SelectStability,QueryProperties
|
657 |
--engine=Innodb
|
|
658 |
--mysqld=--innodb
|
|
659 |
--mysqld=--default-storage-engine=Innodb
|
|
660 |
--mysqld=--transaction-isolation=SERIALIZABLE
|
|
661 |
--mysqld=--innodb-flush-log-at-trx-commit=2
|
|
0.67.322
by John H. Embretsen
pb2gentest: Add --loose- to --table-lock-wait-timeout option, removed in MySQL 5.5 |
662 |
--mysqld=--loose-table-lock-wait-timeout=1
|
0.83.2
by John H. Embretsen
pb2gentest: Add mdl_stability test config. |
663 |
--mysqld=--innodb-lock-wait-timeout=1
|
664 |
--mysqld=--log-output=file
|
|
665 |
--queries=1M
|
|
666 |
--duration=600
|
|
667 |
'; |
|
0.99.5
by John H. Embretsen
pb2gentest: Add mdl_deadlock test, using higher lock wait timeouts than other MDL tests in order to detect more potential deadlocks. The downside is that this test may also detect more false deadlocks (valid lock waits). |
668 |
} elsif ($test =~ m{^mdl_deadlock}io ) { |
669 |
#
|
|
670 |
# Should be same as mdl_stress (or mdl_stability, whichever has produced
|
|
671 |
# the most deadlocks), except with higher (~default) lock_wait_timeouts.
|
|
672 |
# The other variants have very low wait timeouts, making it difficult to
|
|
673 |
# detect invalid deadlocks.
|
|
674 |
# As per Feb-26-2010 default innodb-lock-wait-timeout=50 and
|
|
0.99.8
by John H. Embretsen
pb2gentest: Correct lock timeout name in mdl_deadlock test. |
675 |
# lock-wait-timeout=31536000 (bug#45225).
|
676 |
# We may want to switch to real (implicit) defaults later.
|
|
0.99.5
by John H. Embretsen
pb2gentest: Add mdl_deadlock test, using higher lock wait timeouts than other MDL tests in order to detect more potential deadlocks. The downside is that this test may also detect more false deadlocks (valid lock waits). |
677 |
#
|
0.67.565
by John H. Embretsen
pb2gentest*: Automatically look for redefine file to match the given grammar file. If found, add --redefine=file to RQG command line. Also: |
678 |
# We use full grammar + redefine file for some branches, and custom grammar
|
679 |
# with possibly no redefine file for others, hence this special grammar
|
|
680 |
# logic.
|
|
681 |
#
|
|
682 |
my $grammar = "conf/runtime/WL5004_sql.yy"; |
|
683 |
if ($tree =~ m{next-mr}i) { |
|
684 |
say("Custom grammar selected based on tree name ($tree)."); |
|
685 |
$grammar = "conf/runtime/WL5004_sql_custom.yy"; |
|
686 |
}
|
|
0.99.5
by John H. Embretsen
pb2gentest: Add mdl_deadlock test, using higher lock wait timeouts than other MDL tests in order to detect more potential deadlocks. The downside is that this test may also detect more false deadlocks (valid lock waits). |
687 |
$command = ' |
0.67.565
by John H. Embretsen
pb2gentest*: Automatically look for redefine file to match the given grammar file. If found, add --redefine=file to RQG command line. Also: |
688 |
--grammar='.$grammar.' |
0.99.5
by John H. Embretsen
pb2gentest: Add mdl_deadlock test, using higher lock wait timeouts than other MDL tests in order to detect more potential deadlocks. The downside is that this test may also detect more false deadlocks (valid lock waits). |
689 |
--threads=10
|
690 |
--queries=1M
|
|
0.99.13
by John H. Embretsen
pb2gentest: Change duration for mdl_deadlock test to 20 mins (more Pushbuild friendly). |
691 |
--duration=1200
|
0.99.5
by John H. Embretsen
pb2gentest: Add mdl_deadlock test, using higher lock wait timeouts than other MDL tests in order to detect more potential deadlocks. The downside is that this test may also detect more false deadlocks (valid lock waits). |
692 |
--mysqld=--innodb
|
693 |
--mysqld=--innodb-lock-wait-timeout=50
|
|
0.99.8
by John H. Embretsen
pb2gentest: Correct lock timeout name in mdl_deadlock test. |
694 |
--mysqld=--lock-wait-timeout=31536000
|
0.99.5
by John H. Embretsen
pb2gentest: Add mdl_deadlock test, using higher lock wait timeouts than other MDL tests in order to detect more potential deadlocks. The downside is that this test may also detect more false deadlocks (valid lock waits). |
695 |
--mysqld=--log-output=file
|
0.67.565
by John H. Embretsen
pb2gentest*: Automatically look for redefine file to match the given grammar file. If found, add --redefine=file to RQG command line. Also: |
696 |
'; |
0.83.1
by John H. Embretsen
pb2gentest: Rename mdl test to mdl_stress. |
697 |
} elsif ($test =~ m{^mdl_stress}io ) { |
0.81.8
by John H. Embretsen
pb2gentest: Add test config for comprehensive metadata locking test (WL#5004) |
698 |
# Seems like --gendata=conf/WL5004_data.zz unexplicably causes more test
|
699 |
# failures, so let's leave this out of PB2 for the time being (pstoev).
|
|
0.67.152
by John H. Embretsen
pb2gentest: Rename mdl_innodb to mdl and enable innodb explicitly, based on feedback from pstoev (test is not per se for innodb so having innodb in the test name may be confusing). |
700 |
#
|
701 |
# InnoDB should be loaded but the test is not per se for InnoDB, hence
|
|
702 |
# no "innodb" in test name.
|
|
0.67.565
by John H. Embretsen
pb2gentest*: Automatically look for redefine file to match the given grammar file. If found, add --redefine=file to RQG command line. Also: |
703 |
#
|
704 |
# We use full grammar + redefine file for some branches, and custom grammar
|
|
705 |
# with possibly no redefine file for others, hence this special grammar
|
|
706 |
# logic.
|
|
707 |
#
|
|
708 |
my $grammar = "conf/runtime/WL5004_sql.yy"; |
|
709 |
if ($tree =~ m{next-mr}i) { |
|
710 |
say("Custom grammar selected based on tree name ($tree)."); |
|
711 |
$grammar = "conf/runtime/WL5004_sql_custom.yy"; |
|
712 |
}
|
|
0.81.8
by John H. Embretsen
pb2gentest: Add test config for comprehensive metadata locking test (WL#5004) |
713 |
$command = ' |
0.67.565
by John H. Embretsen
pb2gentest*: Automatically look for redefine file to match the given grammar file. If found, add --redefine=file to RQG command line. Also: |
714 |
--grammar='.$grammar.' |
0.81.8
by John H. Embretsen
pb2gentest: Add test config for comprehensive metadata locking test (WL#5004) |
715 |
--threads=10
|
716 |
--queries=1M
|
|
717 |
--duration=1800
|
|
0.67.152
by John H. Embretsen
pb2gentest: Rename mdl_innodb to mdl and enable innodb explicitly, based on feedback from pstoev (test is not per se for innodb so having innodb in the test name may be confusing). |
718 |
--mysqld=--innodb
|
0.81.8
by John H. Embretsen
pb2gentest: Add test config for comprehensive metadata locking test (WL#5004) |
719 |
'; |
0.67.565
by John H. Embretsen
pb2gentest*: Automatically look for redefine file to match the given grammar file. If found, add --redefine=file to RQG command line. Also: |
720 |
|
721 |
||
0.67.413
by John H. Embretsen
pb2gentest: Add outer_join test based on recommendations from Patrick C. |
722 |
#
|
0.106.13
by John H. Embretsen
pb2gentest: Increase queries for outer_join test, but lower duration (more coverage on faster machines while limiting load on slower ones). |
723 |
# opt: Optimizer tests in "nice mode", primarily used for regression testing (5.1 and beyond).
|
724 |
# By "nice mode" we mean relatively short duration and/or num of queries and fixed seed.
|
|
0.67.413
by John H. Embretsen
pb2gentest: Add outer_join test based on recommendations from Patrick C. |
725 |
#
|
0.67.415
by John H. Embretsen
pb2gentest: Add opt_access_exp test based on recommendations from Patrick C. |
726 |
} elsif ($test =~ m{^opt_access_exp}io ) { |
727 |
# More queries drastically increases runtime.
|
|
728 |
# We use a larger than default duration to allow even slower machines to do
|
|
729 |
# useful testing.
|
|
730 |
# This test is for hitting as many table access methods as possible.
|
|
731 |
$command = ' |
|
732 |
--threads=1
|
|
733 |
--queries=10K
|
|
734 |
--gendata='.$conf.'/optimizer/range_access.zz |
|
735 |
--grammar='.$conf.'/optimizer/optimizer_access_exp.yy |
|
736 |
--duration=1200
|
|
737 |
'; |
|
0.67.419
by John H. Embretsen
pb2gentest: Add opt_range_access (longish-running) test. Also fix so that opt_no_subquery is not run when we mean to run opt_no_subquery_compare_50. |
738 |
} elsif ($test =~ m{^opt_no_subquery$}io ) { |
0.67.418
by John H. Embretsen
pb2gentest: Add opt_no_subquery test, following recommendations from Patrick C. |
739 |
$command = ' |
740 |
--threads=1
|
|
741 |
--queries=100K
|
|
742 |
--grammar='.$conf.'/optimizer/optimizer_no_subquery.yy |
|
743 |
--duration=1200
|
|
744 |
'; |
|
0.67.416
by John H. Embretsen
pb2gentest: Add opt_no_subquery_compare_50 test for comparing queries for current server to 5.0 server. |
745 |
} elsif ($test =~ m{^opt_no_subquery_compare_50}io ) { |
746 |
# Compares query results from 5.1 to those from 5.0.
|
|
747 |
# We do not want the Shutdown reporter (default) here, in order to be able to compare dumps, so specify --reporters.
|
|
748 |
$command = ' |
|
749 |
--basedir1='.$basedir.' |
|
750 |
--basedir2='.$basedirRelease50.' |
|
751 |
--vardir1='.$vardir.'/vardir-bzr |
|
752 |
--vardir2='.$vardir.'/vardir-5.0 |
|
753 |
--threads=1
|
|
754 |
--queries=20K
|
|
755 |
--grammar='.$conf.'/optimizer/optimizer_no_subquery_portable.yy |
|
756 |
--validator=ResultsetComparatorSimplify
|
|
757 |
--reporters=Deadlock,ErrorLog,Backtrace
|
|
758 |
--views
|
|
759 |
--duration=1200
|
|
760 |
'; |
|
0.67.419
by John H. Embretsen
pb2gentest: Add opt_range_access (longish-running) test. Also fix so that opt_no_subquery is not run when we mean to run opt_no_subquery_compare_50. |
761 |
} elsif ($test =~ m{^opt_range_access}io ) { |
0.67.423
by John H. Embretsen
pb2gentest: Reduce duration for range_access test until we are able to prove to PB2 that we are alive even with no output to stdout for 30 minutes. Should probably look more detailed at the test as well to see what is going on. |
762 |
# We should use a larger than default duration to allow even slower machines to do
|
0.67.419
by John H. Embretsen
pb2gentest: Add opt_range_access (longish-running) test. Also fix so that opt_no_subquery is not run when we mean to run opt_no_subquery_compare_50. |
763 |
# useful testing.
|
764 |
# 15K queries means runtime of ~40 mins on standard desktop hardware of Apr2010.
|
|
0.67.423
by John H. Embretsen
pb2gentest: Reduce duration for range_access test until we are able to prove to PB2 that we are alive even with no output to stdout for 30 minutes. Should probably look more detailed at the test as well to see what is going on. |
765 |
# Used to allow 45 mins (2700s) of runtime.
|
766 |
# This caused PB2 timeouts (30 min), so duration is now set to 25 minutes.
|
|
767 |
# TODO: Adjust after implementing https://blueprints.launchpad.net/randgen/+spec/heartbeat-in-output
|
|
0.67.419
by John H. Embretsen
pb2gentest: Add opt_range_access (longish-running) test. Also fix so that opt_no_subquery is not run when we mean to run opt_no_subquery_compare_50. |
768 |
$command = ' |
769 |
--threads=1
|
|
770 |
--queries=15K
|
|
771 |
--gendata='.$conf.'/optimizer/range_access.zz |
|
772 |
--grammar='.$conf.'/optimizer/range_access.yy |
|
0.67.423
by John H. Embretsen
pb2gentest: Reduce duration for range_access test until we are able to prove to PB2 that we are alive even with no output to stdout for 30 minutes. Should probably look more detailed at the test as well to see what is going on. |
773 |
--duration=1500
|
0.67.419
by John H. Embretsen
pb2gentest: Add opt_range_access (longish-running) test. Also fix so that opt_no_subquery is not run when we mean to run opt_no_subquery_compare_50. |
774 |
'; |
0.67.414
by John H. Embretsen
pb2gentest: Add opt_subquery test based on recommendations from Patrick C. Also fix typo in comment. |
775 |
} elsif ($test =~ m{^opt_subquery}io ) { |
776 |
# Produces large and time consuming queries, so we use a larger than default
|
|
777 |
# duration to allow even slower machines to do useful testing.
|
|
778 |
$command = ' |
|
779 |
--threads=1
|
|
780 |
--queries=75K
|
|
781 |
--grammar='.$conf.'/optimizer/optimizer_subquery.yy |
|
782 |
--duration=1200
|
|
783 |
'; |
|
0.67.417
by John H. Embretsen
pb2gentest: Alphabetize optimizer test definitions. |
784 |
} elsif ($test =~ m{^outer_join}io ) { |
0.106.13
by John H. Embretsen
pb2gentest: Increase queries for outer_join test, but lower duration (more coverage on faster machines while limiting load on slower ones). |
785 |
# Any larger queries value than 30k used to cause a known/documented crash (5.1).
|
786 |
# This seems to have been fixed by now.
|
|
0.67.417
by John H. Embretsen
pb2gentest: Alphabetize optimizer test definitions. |
787 |
# Produces large and time consuming queries, so we use a larger than default
|
788 |
# duration to allow even slower machines to do useful testing.
|
|
789 |
$command = ' |
|
790 |
--threads=1
|
|
0.106.13
by John H. Embretsen
pb2gentest: Increase queries for outer_join test, but lower duration (more coverage on faster machines while limiting load on slower ones). |
791 |
--queries=80K
|
0.67.417
by John H. Embretsen
pb2gentest: Alphabetize optimizer test definitions. |
792 |
--gendata='.$conf.'/optimizer/outer_join.zz |
793 |
--grammar='.$conf.'/optimizer/outer_join.yy |
|
0.106.13
by John H. Embretsen
pb2gentest: Increase queries for outer_join test, but lower duration (more coverage on faster machines while limiting load on slower ones). |
794 |
--duration=900
|
0.67.417
by John H. Embretsen
pb2gentest: Alphabetize optimizer test definitions. |
795 |
'; |
0.67.414
by John H. Embretsen
pb2gentest: Add opt_subquery test based on recommendations from Patrick C. Also fix typo in comment. |
796 |
#
|
797 |
# End of optimizer tests.
|
|
798 |
#
|
|
0.81.2
by John H. Embretsen
pb2gentest: Add --valgrind option to runall commands for tests which names include 'valgrind'. |
799 |
} elsif ($test =~ m{^partition_ddl}io ) { |
0.67.93
by John H. Embretsen
pb2gentest: Add configuration for 'partition_ddl' test. |
800 |
$command = ' |
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
801 |
--grammar='.$conf.'/partitioning/partitions-ddl.yy |
0.67.142
by John H. Embretsen
pb2gentest: Set option --mysqld=--innodb for tests that always use innodb. |
802 |
--mysqld=--innodb
|
0.67.93
by John H. Embretsen
pb2gentest: Add configuration for 'partition_ddl' test. |
803 |
--threads=1
|
804 |
--queries=100K
|
|
805 |
'; |
|
0.81.2
by John H. Embretsen
pb2gentest: Add --valgrind option to runall commands for tests which names include 'valgrind'. |
806 |
} elsif ($test =~ m{partn_pruning(|.valgrind)$}io ) { |
0.67.126
by John H. Embretsen
pb2gentest: partn_pruning: Reduce duration from default (600s) to 300s, since we also spend a lot of time creating tables. |
807 |
# reduced duration to half since gendata phase takes longer in this case
|
0.67.94
by John H. Embretsen
pb2gentest: Add first version of config for 'partition_pruning' test. |
808 |
$command = ' |
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
809 |
--gendata='.$conf.'/partitioning/partition_pruning.zz |
810 |
--grammar='.$conf.'/partitioning/partition_pruning.yy |
|
0.67.142
by John H. Embretsen
pb2gentest: Set option --mysqld=--innodb for tests that always use innodb. |
811 |
--mysqld=--innodb
|
0.67.94
by John H. Embretsen
pb2gentest: Add first version of config for 'partition_pruning' test. |
812 |
--threads=1
|
813 |
--queries=100000
|
|
0.67.126
by John H. Embretsen
pb2gentest: partn_pruning: Reduce duration from default (600s) to 300s, since we also spend a lot of time creating tables. |
814 |
--duration=300
|
0.67.94
by John H. Embretsen
pb2gentest: Add first version of config for 'partition_pruning' test. |
815 |
'; |
0.81.2
by John H. Embretsen
pb2gentest: Add --valgrind option to runall commands for tests which names include 'valgrind'. |
816 |
} elsif ($test =~ m{^partn_pruning_compare_50}io) { |
0.67.114
by John H. Embretsen
pb2gentest: Add partn_pruning_compare_50 test definition, including setting path to installation of 5.0 release against which to do query result comparison. This is to be considered experimental for the time being. |
817 |
$command = ' |
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
818 |
--gendata='.$conf.'/partitioning/partition_pruning.zz |
819 |
--grammar='.$conf.'/partitioning/partition_pruning.yy |
|
0.67.114
by John H. Embretsen
pb2gentest: Add partn_pruning_compare_50 test definition, including setting path to installation of 5.0 release against which to do query result comparison. This is to be considered experimental for the time being. |
820 |
--basedir1='.$basedir.' |
821 |
--basedir2='.$basedirRelease50.' |
|
822 |
--vardir1='.$vardir.'/vardir-bzr |
|
823 |
--vardir2='.$vardir.'/vardir-5.0 |
|
0.67.142
by John H. Embretsen
pb2gentest: Set option --mysqld=--innodb for tests that always use innodb. |
824 |
--mysqld=--innodb
|
0.80.5
by John H. Embretsen
pb2gentest: Changes to partn_pruning_compare_50: |
825 |
--validators=ResultsetComparator
|
826 |
--reporters=Deadlock,ErrorLog,Backtrace
|
|
0.67.114
by John H. Embretsen
pb2gentest: Add partn_pruning_compare_50 test definition, including setting path to installation of 5.0 release against which to do query result comparison. This is to be considered experimental for the time being. |
827 |
--threads=1
|
828 |
--queries=10000
|
|
0.80.5
by John H. Embretsen
pb2gentest: Changes to partn_pruning_compare_50: |
829 |
--duration=300
|
0.67.114
by John H. Embretsen
pb2gentest: Add partn_pruning_compare_50 test definition, including setting path to installation of 5.0 release against which to do query result comparison. This is to be considered experimental for the time being. |
830 |
'; |
0.81.2
by John H. Embretsen
pb2gentest: Add --valgrind option to runall commands for tests which names include 'valgrind'. |
831 |
} elsif ($test =~ m{^rpl_.*?_simple}io) { |
0.67.84
by John H. Embretsen
pb2gentest: Made test configurations that support or are used for the Falcon engine only trigger only if falcon is mentioned in test name. Otherwise this may interfere with other tests for other features. This should make myisam_blob_recovery work (used to fail due to unknown falcon option being specified). Also moved multi-engine or engine independent tests closer together. |
832 |
# Not used; rpl testing needs adjustments (some of the failures this
|
833 |
# produces are known replication issues documented in the manual).
|
|
0.67.1
by Philip Stoev
initial import from internal tree |
834 |
$command = ' |
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
835 |
--gendata='.$conf.'/replication/replication_single_engine.zz |
836 |
--grammar='.$conf.'/replication/replication_simple.yy |
|
0.67.1
by Philip Stoev
initial import from internal tree |
837 |
--mysqld=--log-output=table,file
|
0.70.2
by John H. Embretsen
Added new test rpl_semisync to pb2gentest.pl. |
838 |
'; |
0.67.84
by John H. Embretsen
pb2gentest: Made test configurations that support or are used for the Falcon engine only trigger only if falcon is mentioned in test name. Otherwise this may interfere with other tests for other features. This should make myisam_blob_recovery work (used to fail due to unknown falcon option being specified). Also moved multi-engine or engine independent tests closer together. |
839 |
} elsif ($test =~ m{^rpl_.*?_complex}io) { |
840 |
# Not used; rpl testing needs adjustments (some of the failures this
|
|
841 |
# produces are known replication issues documented in the manual).
|
|
842 |
$command = ' |
|
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
843 |
--gendata='.$conf.'/replication/replication_single_engine_pk.zz |
844 |
--grammar='.$conf.'/replication/replication.yy |
|
0.67.84
by John H. Embretsen
pb2gentest: Made test configurations that support or are used for the Falcon engine only trigger only if falcon is mentioned in test name. Otherwise this may interfere with other tests for other features. This should make myisam_blob_recovery work (used to fail due to unknown falcon option being specified). Also moved multi-engine or engine independent tests closer together. |
845 |
--mysqld=--log-output=table,file
|
0.67.142
by John H. Embretsen
pb2gentest: Set option --mysqld=--innodb for tests that always use innodb. |
846 |
--mysqld=--innodb
|
0.67.84
by John H. Embretsen
pb2gentest: Made test configurations that support or are used for the Falcon engine only trigger only if falcon is mentioned in test name. Otherwise this may interfere with other tests for other features. This should make myisam_blob_recovery work (used to fail due to unknown falcon option being specified). Also moved multi-engine or engine independent tests closer together. |
847 |
'; |
0.81.2
by John H. Embretsen
pb2gentest: Add --valgrind option to runall commands for tests which names include 'valgrind'. |
848 |
} elsif ($test =~ m{^rpl_semisync}io) { |
0.70.2
by John H. Embretsen
Added new test rpl_semisync to pb2gentest.pl. |
849 |
# --rpl_mode=default is used because the .YY file changes the binary log format dynamically.
|
850 |
# --threads=1 is used to avoid any replication failures due to concurrent DDL.
|
|
851 |
# --validator= line will remove the default replication Validator, which would otherwise
|
|
852 |
# report test failure when the slave I/O thread is stopped, which is OK in the context
|
|
853 |
# of this particular test.
|
|
0.70.3
by John H. Embretsen
pb2gentest: Logic for making sure correct plugin file name is passed on to the RQG/MySQL on Windows (.dll vs .so) for rpl_semisync test. |
854 |
|
0.67.79
by John H. Embretsen
pb2gentest: Enable rpl_semisync test on Windows, as support for this was recently added to replication development branches. |
855 |
# Plugin file names and location vary between platforms.
|
0.67.187
by John H. Embretsen
pb2gentest: Extra comment about semisync plugin location, in case we see issues with this in the future. |
856 |
# See http://bugs.mysql.com/bug.php?id=49170 for details.
|
0.89.1
by John H. Embretsen
Workaround for MySQL bug 48351: Support semisync plugin names both with and without 'lib'-prefix. With time only non-prefixed plugin name will be used. Also support other plugin dirs (release builds, sandbox builds etc) by doing recursive search for plugin files. First match wins. |
857 |
# We search for the respective file names under basedir (recursively).
|
858 |
# The first matching file that is found is used.
|
|
859 |
# We assume that both master and slave plugins are in the same dir.
|
|
0.67.187
by John H. Embretsen
pb2gentest: Extra comment about semisync plugin location, in case we see issues with this in the future. |
860 |
# Unix file name extenstions other than .so may exist, but support for this
|
861 |
# is not yet implemented here.
|
|
0.67.79
by John H. Embretsen
pb2gentest: Enable rpl_semisync test on Windows, as support for this was recently added to replication development branches. |
862 |
my $plugin_dir; |
0.70.3
by John H. Embretsen
pb2gentest: Logic for making sure correct plugin file name is passed on to the RQG/MySQL on Windows (.dll vs .so) for rpl_semisync test. |
863 |
my $plugins; |
0.67.381
by Bernt M. Johnsen
Adjustments after merge |
864 |
if (osWindows()) { |
0.89.1
by John H. Embretsen
Workaround for MySQL bug 48351: Support semisync plugin names both with and without 'lib'-prefix. With time only non-prefixed plugin name will be used. Also support other plugin dirs (release builds, sandbox builds etc) by doing recursive search for plugin files. First match wins. |
865 |
my $master_plugin_name = "semisync_master.dll"; |
866 |
$plugin_dir=findDirectory($master_plugin_name); |
|
867 |
if (not defined $plugin_dir) { |
|
868 |
carp "Unable to find semisync plugin $master_plugin_name!"; |
|
869 |
}
|
|
870 |
$plugins = 'rpl_semi_sync_master='.$master_plugin_name.';rpl_semi_sync_slave=semisync_slave.dll'; |
|
0.70.3
by John H. Embretsen
pb2gentest: Logic for making sure correct plugin file name is passed on to the RQG/MySQL on Windows (.dll vs .so) for rpl_semisync test. |
871 |
} else { |
0.67.79
by John H. Embretsen
pb2gentest: Enable rpl_semisync test on Windows, as support for this was recently added to replication development branches. |
872 |
# tested on Linux and Solaris
|
0.89.1
by John H. Embretsen
Workaround for MySQL bug 48351: Support semisync plugin names both with and without 'lib'-prefix. With time only non-prefixed plugin name will be used. Also support other plugin dirs (release builds, sandbox builds etc) by doing recursive search for plugin files. First match wins. |
873 |
my $prefix; # for Bug#48351 |
874 |
my $master_plugin_name = "semisync_master.so"; |
|
875 |
$plugin_dir=findDirectory($master_plugin_name); |
|
876 |
if (not defined $plugin_dir) { |
|
877 |
# Until fix for Bug#48351 is widespread it may happen
|
|
878 |
# that the Unix plugin names are prefixed with "lib".
|
|
879 |
# Remove this when no longer needed.
|
|
880 |
$prefix = 'lib'; |
|
881 |
$plugin_dir=findDirectory($prefix.$master_plugin_name); |
|
882 |
if (not defined $plugin_dir) { |
|
883 |
carp "Unable to find semisync plugin! ($master_plugin_name or $prefix$master_plugin_name)"; |
|
884 |
}
|
|
885 |
}
|
|
886 |
$plugins = 'rpl_semi_sync_master='.$prefix.$master_plugin_name.':rpl_semi_sync_slave='.$prefix.'semisync_slave.so'; |
|
0.70.3
by John H. Embretsen
pb2gentest: Logic for making sure correct plugin file name is passed on to the RQG/MySQL on Windows (.dll vs .so) for rpl_semisync test. |
887 |
}
|
0.67.120
by John H. Embretsen
pb2gentest: Prepare for splitting of RQG framework and grammars by making grammar and gendata file location configurable. |
888 |
$command = ' |
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
889 |
--gendata='.$conf.'/replication/replication_single_engine.zz |
0.67.63
by Philip Stoev
fixes to pb2gentest.pl for semisynch replication |
890 |
--engine=InnoDB
|
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
891 |
--grammar='.$conf.'/replication/replication_simple.yy |
0.70.2
by John H. Embretsen
Added new test rpl_semisync to pb2gentest.pl. |
892 |
--rpl_mode=default
|
0.67.120
by John H. Embretsen
pb2gentest: Prepare for splitting of RQG framework and grammars by making grammar and gendata file location configurable. |
893 |
--mysqld=--plugin-dir='.$plugin_dir.' |
894 |
--mysqld=--plugin-load='.$plugins.' |
|
0.70.2
by John H. Embretsen
Added new test rpl_semisync to pb2gentest.pl. |
895 |
--mysqld=--rpl_semi_sync_master_enabled=1
|
896 |
--mysqld=--rpl_semi_sync_slave_enabled=1
|
|
0.81.1
by John H. Embretsen
pb2gentest: Generalize use of --innodb option. Add it if test name includes 'innodb'. Also continue adding it for special tests whose names do not incldue 'innodb'. innodb_limit test added for script testing purposes (for now). |
897 |
--mysqld=--innodb
|
0.67.63
by Philip Stoev
fixes to pb2gentest.pl for semisynch replication |
898 |
--reporters=ReplicationSemiSync,Deadlock,Backtrace,ErrorLog
|
0.67.186
by John H. Embretsen
pb2gentest: Specify 'None' validator when we do not want to use any validators. See bug#49167. |
899 |
--validators=None
|
0.70.2
by John H. Embretsen
Added new test rpl_semisync to pb2gentest.pl. |
900 |
--threads=1
|
901 |
--duration=300
|
|
902 |
--queries=1M
|
|
0.67.120
by John H. Embretsen
pb2gentest: Prepare for splitting of RQG framework and grammars by making grammar and gendata file location configurable. |
903 |
'; |
0.67.92
by John H. Embretsen
pb2gentest: Reorder (alphabetize) non-falcon test definitions for easier lookup. |
904 |
} elsif ($test =~ m{signal_resignal}io ) { |
0.67.1
by Philip Stoev
initial import from internal tree |
905 |
$command = ' |
0.67.92
by John H. Embretsen
pb2gentest: Reorder (alphabetize) non-falcon test definitions for easier lookup. |
906 |
--threads=10
|
907 |
--queries=1M
|
|
908 |
--duration=300
|
|
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
909 |
--grammar='.$conf.'/runtime/signal_resignal.yy |
0.67.92
by John H. Embretsen
pb2gentest: Reorder (alphabetize) non-falcon test definitions for easier lookup. |
910 |
--mysqld=--max-sp-recursion-depth=10
|
0.67.1
by Philip Stoev
initial import from internal tree |
911 |
'; |
0.67.222
by John H. Embretsen
pb2gentest: Explicitly support innodb and myisam engines for test using maria_stress grammar. |
912 |
} elsif ($test =~ m{(innodb|maria|myisam)_stress}io ) { |
0.67.1
by Philip Stoev
initial import from internal tree |
913 |
$command = ' |
0.99.3
by John H. Embretsen
Categorized configuration files by moving them into subdirectories with descriptive names. |
914 |
--grammar='.$conf.'/engines/maria/maria_stress.yy |
0.67.1
by Philip Stoev
initial import from internal tree |
915 |
'; |
0.67.398
by John H. Embretsen
Start using BzrInfo module for reporting versions to screen and XML reports. |
916 |
} elsif ($test =~ m{example}io ) { |
917 |
# this is here for the purpose testing this script
|
|
918 |
$command = ' |
|
919 |
--grammar='.$conf.'/examples/example.yy |
|
920 |
--threads=1
|
|
921 |
--duration=40
|
|
922 |
--queries=10000
|
|
923 |
'; |
|
924 |
}else { |
|
0.99.27
by John H. Embretsen
Use say() instead of print() where we can, to get a uniform prefix for all chatter (PB2 scripts). Almost all remaining prints are nedded to conform with current external (PB2) log parsers. |
925 |
say("[ERROR]: Test configuration for test name '$test' is not ". |
0.67.85
by John H. Embretsen
pb2gentest: Exit with an error message if test name is not recognized by this script. |
926 |
"defined in this script.\n"); |
927 |
my $exitCode = 1; |
|
0.99.27
by John H. Embretsen
Use say() instead of print() where we can, to get a uniform prefix for all chatter (PB2 scripts). Almost all remaining prints are nedded to conform with current external (PB2) log parsers. |
928 |
say("Will exit $0 with exit code $exitCode.\n"); |
0.67.85
by John H. Embretsen
pb2gentest: Exit with an error message if test name is not recognized by this script. |
929 |
POSIX::_exit ($exitCode); |
0.67.1
by Philip Stoev
initial import from internal tree |
930 |
}
|
931 |
||
0.71.1
by John H. Embretsen
Added new tests info_schema and signal_resignal to pb2gentest, and added basic "skip test" functionality. |
932 |
#
|
0.67.565
by John H. Embretsen
pb2gentest*: Automatically look for redefine file to match the given grammar file. If found, add --redefine=file to RQG command line. Also: |
933 |
# Look for a redefine file for the grammar used, and add it to the command line
|
934 |
# if found. Also print special comments (e.g. about disabled parts) from the
|
|
935 |
# redefine file, alternatively the grammar file if no redefine file was found.
|
|
936 |
#
|
|
937 |
$redefine_file = redefine_filename($command); |
|
938 |
$command = $command.' --redefine='.$redefine_file if defined $redefine_file; |
|
939 |
||
940 |
||
941 |
#
|
|
0.71.1
by John H. Embretsen
Added new tests info_schema and signal_resignal to pb2gentest, and added basic "skip test" functionality. |
942 |
# Specify some "default" Reporters if none have been specified already.
|
943 |
# The RQG itself also specifies some default values for some options if not set.
|
|
944 |
#
|
|
0.67.1
by Philip Stoev
initial import from internal tree |
945 |
if ($command =~ m{--reporters}io) { |
946 |
# Reporters have already been specified
|
|
947 |
} elsif ($test =~ m{rpl}io ) { |
|
0.71.1
by John H. Embretsen
Added new tests info_schema and signal_resignal to pb2gentest, and added basic "skip test" functionality. |
948 |
# Don't include Recovery for replication tests, because
|
949 |
$command = $command.' --reporters=Deadlock,ErrorLog,Backtrace'; |
|
950 |
} elsif ($test =~ m{falcon}io ) { |
|
951 |
# Include the Recovery reporter for Falcon tests in order to test
|
|
952 |
# recovery by default after each such test.
|
|
953 |
$command = $command.' --reporters=Deadlock,ErrorLog,Backtrace,Recovery,Shutdown'; |
|
954 |
# Falcon-only options (avoid "unknown variable" warnings in non-Falcon builds)
|
|
955 |
$command = $command.' --mysqld=--loose-falcon-lock-wait-timeout=5 --mysqld=--loose-falcon-debug-mask=2'; |
|
0.67.1
by Philip Stoev
initial import from internal tree |
956 |
} else { |
0.71.1
by John H. Embretsen
Added new tests info_schema and signal_resignal to pb2gentest, and added basic "skip test" functionality. |
957 |
# Default reporters for tests whose name does not contain "rpl" or "falcon"
|
958 |
$command = $command.' --reporters=Deadlock,ErrorLog,Backtrace,Shutdown'; |
|
0.67.1
by Philip Stoev
initial import from internal tree |
959 |
}
|
960 |
||
0.81.1
by John H. Embretsen
pb2gentest: Generalize use of --innodb option. Add it if test name includes 'innodb'. Also continue adding it for special tests whose names do not incldue 'innodb'. innodb_limit test added for script testing purposes (for now). |
961 |
#
|
962 |
# Other defaults...
|
|
963 |
#
|
|
964 |
||
0.67.1
by Philip Stoev
initial import from internal tree |
965 |
if ($command !~ m{--duration}io ) { |
0.67.103
by John H. Embretsen
pb2gentest: Set default duration of 10 minutes. 20 minutes is too long when the number of RQG tests in PB2 increases, causing delays. |
966 |
# Set default duration for tests where duration is not specified.
|
967 |
# In PB2 we cannot run tests for too long since there are many branches
|
|
968 |
# and many pushes (or other test triggers).
|
|
969 |
# Setting it to 10 minutes for now.
|
|
970 |
$command = $command.' --duration=600'; |
|
0.67.1
by Philip Stoev
initial import from internal tree |
971 |
}
|
972 |
||
0.67.115
by John H. Embretsen
pb2gentest: Do not set default --basedir if some basedir is already set. |
973 |
if ($command !~ m{--basedir}io ) { |
974 |
$command = $command." --basedir=\"$basedir\""; |
|
975 |
}
|
|
976 |
||
0.67.1
by Philip Stoev
initial import from internal tree |
977 |
if ($command !~ m{--vardir}io && $command !~ m{--mem}io ) { |
978 |
$command = $command." --vardir=\"$vardir\""; |
|
979 |
}
|
|
980 |
||
0.67.420
by John H. Embretsen
pb2gentest: Do not set --loose-log-output option when testing MySQL 5.0.x, otherwise the server will refuse to start. |
981 |
# Logging to file is faster than table. And we want some form of logging.
|
982 |
# This option is not present in versions prior to 5.1.6, so skipping for 5.0.
|
|
0.67.1
by Philip Stoev
initial import from internal tree |
983 |
if ($command !~ m{--log-output}io) { |
0.67.420
by John H. Embretsen
pb2gentest: Do not set --loose-log-output option when testing MySQL 5.0.x, otherwise the server will refuse to start. |
984 |
if (!$version50) { |
985 |
$command = $command.' --mysqld=--log-output=file'; |
|
986 |
}
|
|
0.67.1
by Philip Stoev
initial import from internal tree |
987 |
}
|
988 |
||
0.67.330
by John H. Embretsen
pb2gentest: Decrease default lock-wait timeouts to 1s. Add new option --loose-lock-wait-timeout=1 by default. |
989 |
# 1s to enable increased concurrency. NOTE: Removed in MySQL 5.5, Feb 2010.
|
0.67.323
by John H. Embretsen
pb2gentest: Make sure custom set values of lock timeouts are not overridden. |
990 |
if ($command !~ m{table-lock-wait-timeout}io) { |
0.67.330
by John H. Embretsen
pb2gentest: Decrease default lock-wait timeouts to 1s. Add new option --loose-lock-wait-timeout=1 by default. |
991 |
$command = $command.' --mysqld=--loose-table-lock-wait-timeout=1'; |
992 |
}
|
|
993 |
||
994 |
# 1s to enable increased concurrency. NOTE: Added in MySQL 5.5, Feb 2010 (bug#45225).
|
|
995 |
# Default value in the server is 1 year.
|
|
996 |
if ($command !~ m{(--|--loose-)lock-wait-timeout}io) { |
|
997 |
$command = $command.' --mysqld=--loose-lock-wait-timeout=1'; |
|
998 |
}
|
|
999 |
||
1000 |
# Decrease from default (50s) to 1s to enable increased concurrency.
|
|
0.67.323
by John H. Embretsen
pb2gentest: Make sure custom set values of lock timeouts are not overridden. |
1001 |
if ($command !~ m{innodb-lock-wait-timeout}io) { |
0.67.330
by John H. Embretsen
pb2gentest: Decrease default lock-wait timeouts to 1s. Add new option --loose-lock-wait-timeout=1 by default. |
1002 |
$command = $command.' --mysqld=--loose-innodb-lock-wait-timeout=1'; |
0.67.323
by John H. Embretsen
pb2gentest: Make sure custom set values of lock timeouts are not overridden. |
1003 |
}
|
1004 |
||
0.67.1
by Philip Stoev
initial import from internal tree |
1005 |
if ($command !~ m{--queries}io) { |
1006 |
$command = $command.' --queries=100000'; |
|
1007 |
}
|
|
1008 |
||
1009 |
if (($command !~ m{--(engine|default-storage-engine)}io) && (defined $engine)) { |
|
1010 |
$command = $command." --engine=$engine"; |
|
1011 |
}
|
|
1012 |
||
0.82.1
by John H. Embretsen
pb2gentest: Add --engine=innodb for all named innodb tests. |
1013 |
# if test name contains "innodb", add the --mysqld=--innodb and --engine=innodb
|
1014 |
# options if they are not there already.
|
|
1015 |
if ( ($test =~ m{innodb}io) ){ |
|
1016 |
if ($command !~ m{mysqld=--innodb}io){ |
|
1017 |
$command = $command.' --mysqld=--innodb'; |
|
1018 |
}
|
|
1019 |
if ($command !~ m{engine=innodb}io){ |
|
1020 |
$command = $command.' --engine=innodb'; |
|
1021 |
}
|
|
0.81.1
by John H. Embretsen
pb2gentest: Generalize use of --innodb option. Add it if test name includes 'innodb'. Also continue adding it for special tests whose names do not incldue 'innodb'. innodb_limit test added for script testing purposes (for now). |
1022 |
}
|
1023 |
||
0.67.1
by Philip Stoev
initial import from internal tree |
1024 |
if (($command !~ m{--rpl_mode}io) && ($rpl_mode ne '')) { |
1025 |
$command = $command." --rpl_mode=$rpl_mode"; |
|
1026 |
}
|
|
0.81.2
by John H. Embretsen
pb2gentest: Add --valgrind option to runall commands for tests which names include 'valgrind'. |
1027 |
|
1028 |
# if test name contains (usually ends with) "valgrind", add the valgrind option to runall.pl
|
|
1029 |
if ($test =~ m{valgrind}io){ |
|
0.99.27
by John H. Embretsen
Use say() instead of print() where we can, to get a uniform prefix for all chatter (PB2 scripts). Almost all remaining prints are nedded to conform with current external (PB2) log parsers. |
1030 |
say("Detected that this test should enable valgrind instrumentation.\n"); |
0.81.2
by John H. Embretsen
pb2gentest: Add --valgrind option to runall commands for tests which names include 'valgrind'. |
1031 |
if (system("valgrind --version")) { |
0.99.27
by John H. Embretsen
Use say() instead of print() where we can, to get a uniform prefix for all chatter (PB2 scripts). Almost all remaining prints are nedded to conform with current external (PB2) log parsers. |
1032 |
say(" *** valgrind executable not found! Not setting --valgrind flag.\n"); |
0.81.2
by John H. Embretsen
pb2gentest: Add --valgrind option to runall commands for tests which names include 'valgrind'. |
1033 |
} else { |
1034 |
$command = $command.' --valgrind'; |
|
1035 |
}
|
|
1036 |
}
|
|
0.67.1
by Philip Stoev
initial import from internal tree |
1037 |
|
0.67.323
by John H. Embretsen
pb2gentest: Make sure custom set values of lock timeouts are not overridden. |
1038 |
$command = "perl runall.pl --mysqld=--loose-skip-safemalloc ".$command; |
0.67.1
by Philip Stoev
initial import from internal tree |
1039 |
|
0.67.388
by John H. Embretsen
XML and pb2gentest: Automatically enable XML reporting on more hosts. Added comments and adjusted some details. |
1040 |
### XML reporting setup START
|
1041 |
||
0.67.386
by John H. Embretsen
pb2gentest: Try out XML reporting to TT in Pushbuild. Temporary code. |
1042 |
# Pass test name to RQG, for reporting purposes
|
1043 |
$command = $command." --testname=".$test_name; |
|
0.67.388
by John H. Embretsen
XML and pb2gentest: Automatically enable XML reporting on more hosts. Added comments and adjusted some details. |
1044 |
|
0.67.386
by John H. Embretsen
pb2gentest: Try out XML reporting to TT in Pushbuild. Temporary code. |
1045 |
# Enable XML reporting to TestTool.
|
0.67.388
by John H. Embretsen
XML and pb2gentest: Automatically enable XML reporting on more hosts. Added comments and adjusted some details. |
1046 |
# For now only on given hosts...
|
0.67.386
by John H. Embretsen
pb2gentest: Try out XML reporting to TT in Pushbuild. Temporary code. |
1047 |
my %report_xml_from_hosts = ( |
0.67.388
by John H. Embretsen
XML and pb2gentest: Automatically enable XML reporting on more hosts. Added comments and adjusted some details. |
1048 |
'loki06' => '', |
1049 |
'nanna21' => '', |
|
1050 |
'techra22' => '', |
|
1051 |
'tor06-z1' => '', |
|
1052 |
'tyr41' => '' |
|
0.67.386
by John H. Embretsen
pb2gentest: Try out XML reporting to TT in Pushbuild. Temporary code. |
1053 |
);
|
1054 |
my $hostname = hostname(); |
|
1055 |
my $xmlfile; |
|
0.67.388
by John H. Embretsen
XML and pb2gentest: Automatically enable XML reporting on more hosts. Added comments and adjusted some details. |
1056 |
my $delete_xmlfile = 0; # boolean indicator whether to delete local XML file. |
0.67.386
by John H. Embretsen
pb2gentest: Try out XML reporting to TT in Pushbuild. Temporary code. |
1057 |
if (exists $report_xml_from_hosts{$hostname}) { |
0.67.388
by John H. Embretsen
XML and pb2gentest: Automatically enable XML reporting on more hosts. Added comments and adjusted some details. |
1058 |
# We should enable XML reporting on this host...
|
1059 |
say("XML reporting to TestTool automatically enabled based on hostname."); |
|
1060 |
# We need to write the XML to a file before sending to reporting framework.
|
|
1061 |
# This is done by specifying xml-output option.
|
|
1062 |
# TMPDIR should be set by Pushbuild to indicate a suitable location for temp files.
|
|
0.67.400
by John H. Embretsen
pb2gentest.pl: Get tmpdir from GenTest if env var TMPDIR is not set. Also, add path to XML::Writer module to PERL5LIB for Solaris (actually only needed on techra22 (sparc32-bit) right now). Rearranged the latter to a multiline statement to make it easier to maintain. |
1063 |
# GenTest looks for other tmpdir alternatives.
|
1064 |
my $tmpdir = $ENV{'TMPDIR'} || tmpdir(); |
|
0.67.386
by John H. Embretsen
pb2gentest: Try out XML reporting to TT in Pushbuild. Temporary code. |
1065 |
if (length($tmpdir) > 1) { |
0.67.400
by John H. Embretsen
pb2gentest.pl: Get tmpdir from GenTest if env var TMPDIR is not set. Also, add path to XML::Writer module to PERL5LIB for Solaris (actually only needed on techra22 (sparc32-bit) right now). Rearranged the latter to a multiline statement to make it easier to maintain. |
1066 |
# tmpdir may or may not end with a file separator. Make sure it does.
|
1067 |
$tmpdir = $tmpdir.'/' if ($tmpdir =~ m{[^\/\\]+$}); |
|
1068 |
$xmlfile = $tmpdir.$test_name.'.xml'; |
|
0.67.386
by John H. Embretsen
pb2gentest: Try out XML reporting to TT in Pushbuild. Temporary code. |
1069 |
} else { |
0.67.400
by John H. Embretsen
pb2gentest.pl: Get tmpdir from GenTest if env var TMPDIR is not set. Also, add path to XML::Writer module to PERL5LIB for Solaris (actually only needed on techra22 (sparc32-bit) right now). Rearranged the latter to a multiline statement to make it easier to maintain. |
1070 |
# tmpdir not found. Write report to current directory.
|
1071 |
say("A suitable tmpdir was not found. Writing temporary files to current directory"); |
|
0.67.388
by John H. Embretsen
XML and pb2gentest: Automatically enable XML reporting on more hosts. Added comments and adjusted some details. |
1072 |
# This file should be deleted after test end so that disks won't fill up.
|
0.67.386
by John H. Embretsen
pb2gentest: Try out XML reporting to TT in Pushbuild. Temporary code. |
1073 |
$delete_xmlfile = 1; |
1074 |
$xmlfile = $test_name.'.xml'; |
|
1075 |
}
|
|
0.67.388
by John H. Embretsen
XML and pb2gentest: Automatically enable XML reporting on more hosts. Added comments and adjusted some details. |
1076 |
# Enable XML reporting to TT (assuming this is not already enabled):
|
1077 |
$command = $command.' --xml-output='.$xmlfile.' --report-xml-tt'; |
|
1078 |
# Specify XML reporting transport type (not relying on defaults):
|
|
1079 |
# We assume SSH keys have been properly set up to enable seamless scp use.
|
|
1080 |
$command = $command.' --report-xml-tt-type=scp'; |
|
1081 |
# Specify destination for XML reports (not relying on defaults):
|
|
1082 |
$command = $command.' --report-xml-tt-dest=regin.norway.sun.com:/raid/xml_results/TestTool/xml/'; |
|
0.67.386
by John H. Embretsen
pb2gentest: Try out XML reporting to TT in Pushbuild. Temporary code. |
1083 |
}
|
0.67.388
by John H. Embretsen
XML and pb2gentest: Automatically enable XML reporting on more hosts. Added comments and adjusted some details. |
1084 |
### XML reporting setup END
|
1085 |
||
0.67.386
by John H. Embretsen
pb2gentest: Try out XML reporting to TT in Pushbuild. Temporary code. |
1086 |
|
0.67.66
by John H. Embretsen
pb2gentest: Set MTR_BUILD_THREAD to avoid port number conflicts during parallel test runs on the same host. |
1087 |
# Add env variable to specify unique port range to use to avoid conflicts.
|
0.67.212
by John H. Embretsen
pb2gentest: No longer set MTR_BUILD_THREAD unless specified by user. Our PB2 hosts should run Cat most 1 test at a time. |
1088 |
# Trying not to do this unless actually needed.
|
1089 |
if (defined $port_range_id) { |
|
0.99.27
by John H. Embretsen
Use say() instead of print() where we can, to get a uniform prefix for all chatter (PB2 scripts). Almost all remaining prints are nedded to conform with current external (PB2) log parsers. |
1090 |
say("MTR_BUILD_THREAD=$port_range_id\n"); |
0.67.381
by Bernt M. Johnsen
Adjustments after merge |
1091 |
if (osWindows()) { |
0.67.212
by John H. Embretsen
pb2gentest: No longer set MTR_BUILD_THREAD unless specified by user. Our PB2 hosts should run Cat most 1 test at a time. |
1092 |
$command = "set MTR_BUILD_THREAD=$port_range_id && ".$command; |
1093 |
} else { |
|
1094 |
$command = "MTR_BUILD_THREAD=$port_range_id ".$command; |
|
1095 |
}
|
|
0.67.67
by John H. Embretsen
pb2gentest.pl: Fixed setting of MTR_BUILD_THREAD on Windows (multiple commands on single command line). Created convenience variable for checking if we are on Windows OS. |
1096 |
}
|
0.67.66
by John H. Embretsen
pb2gentest: Set MTR_BUILD_THREAD to avoid port number conflicts during parallel test runs on the same host. |
1097 |
|
0.67.1
by Philip Stoev
initial import from internal tree |
1098 |
$command =~ s{[\r\n\t]}{ }sgio; |
0.99.27
by John H. Embretsen
Use say() instead of print() where we can, to get a uniform prefix for all chatter (PB2 scripts). Almost all remaining prints are nedded to conform with current external (PB2) log parsers. |
1099 |
say("Running runall.pl...\n"); |
0.67.1
by Philip Stoev
initial import from internal tree |
1100 |
my $command_result = system($command); |
0.67.124
by John H. Embretsen
pb2gentest: Simple MTR-style reporting of test results, for xref and PB2 (pass/fail only, no signature support yet). |
1101 |
# shift result code to the right to obtain the code returned from the called script
|
1102 |
my $command_result_shifted = ($command_result >> 8); |
|
1103 |
||
1104 |
# Report test result in an MTR fashion so that PB2 will see it and add to
|
|
1105 |
# xref database etc.
|
|
1106 |
# Format: TESTSUITE.TESTCASE 'TESTMODE' [ RESULT ]
|
|
1107 |
# Example: ndb.ndb_dd_alter 'InnoDB plugin' [ fail ]
|
|
1108 |
# Not using TESTMODE for now.
|
|
1109 |
||
1110 |
my $full_test_name = $test_suite_name.'.'.$test_name; |
|
1111 |
# keep test statuses more or less vertically aligned
|
|
1112 |
while (length $full_test_name < 40) |
|
1113 |
{
|
|
1114 |
$full_test_name = $full_test_name.' '; |
|
1115 |
}
|
|
1116 |
||
1117 |
if ($command_result_shifted > 0) { |
|
1118 |
# test failed
|
|
0.67.265
by John H. Embretsen
pb2gentest: Try-out code to mark failing tests as 'experimental' in a test branch in PB2. |
1119 |
# Trying out marking a test as "experimental" by reporting exp-fail:
|
1120 |
# Mark all failures in next-mr-johnemb as experimental (temporary).
|
|
1121 |
if ($ENV{BRANCH_NAME} =~ m{mysql-next-mr-johnemb}) { |
|
1122 |
print($full_test_name." [ exp-fail ]\n"); |
|
1123 |
} else { |
|
1124 |
print($full_test_name." [ fail ]\n"); |
|
1125 |
}
|
|
0.99.27
by John H. Embretsen
Use say() instead of print() where we can, to get a uniform prefix for all chatter (PB2 scripts). Almost all remaining prints are nedded to conform with current external (PB2) log parsers. |
1126 |
say('runall.pl failed with exit code '.$command_result_shifted."\n"); |
1127 |
say("Look above this message in the test log for failure details.\n"); |
|
0.67.124
by John H. Embretsen
pb2gentest: Simple MTR-style reporting of test results, for xref and PB2 (pass/fail only, no signature support yet). |
1128 |
} else { |
1129 |
print($full_test_name." [ pass ]\n"); |
|
1130 |
}
|
|
0.67.1
by Philip Stoev
initial import from internal tree |
1131 |
|
0.67.386
by John H. Embretsen
pb2gentest: Try out XML reporting to TT in Pushbuild. Temporary code. |
1132 |
if ($delete_xmlfile && -e $xmlfile) { |
1133 |
unlink $xmlfile; |
|
1134 |
say("Temporary XML file $xmlfile deleted"); |
|
1135 |
}
|
|
0.80.4
by John H. Embretsen
pb2gentest: Kill remaining mysqld processes also on Windows (requires pskill from MS SysInternals PsTools). |
1136 |
|
1137 |
# Kill remaining mysqld processes.
|
|
1138 |
# Assuming only one test run going on at the same time, and that all mysqld
|
|
1139 |
# processes are ours.
|
|
0.99.27
by John H. Embretsen
Use say() instead of print() where we can, to get a uniform prefix for all chatter (PB2 scripts). Almost all remaining prints are nedded to conform with current external (PB2) log parsers. |
1140 |
say("Checking for remaining mysqld processes...\n"); |
0.67.381
by Bernt M. Johnsen
Adjustments after merge |
1141 |
if (osWindows()) { |
0.80.4
by John H. Embretsen
pb2gentest: Kill remaining mysqld processes also on Windows (requires pskill from MS SysInternals PsTools). |
1142 |
# assumes MS Sysinternals PsTools is installed in C:\bin
|
0.67.136
by John H. Embretsen
Minor fixes to comments in pb2{gentest,combinations}.pl |
1143 |
# If you need to run pslist or pskill as non-Admin user, some adjustments
|
1144 |
# may be needed. See:
|
|
1145 |
# http://blogs.technet.com/markrussinovich/archive/2007/07/09/1449341.aspx
|
|
0.107.8
by John H. Embretsen
pb2gentest*.pl: Support vardir as relative path by adjusting pskill commands. |
1146 |
|
1147 |
# Vardir may be relative path on windows, so convert to absolute path first:
|
|
1148 |
my $vardir_abspath = $vardir; |
|
1149 |
if ($vardir !~ m/^[A-Z]:[\/\\]/i) { |
|
1150 |
# use basedir as prefix
|
|
1151 |
$vardir_abspath = $basedir.'\\'.$vardir; |
|
1152 |
}
|
|
1153 |
||
0.80.6
by John H. Embretsen
pb2gentest: Fix quoting and output redirection around pslist and pskill commands. |
1154 |
if (system('C:\bin\pslist mysqld') == 0) { |
0.99.27
by John H. Embretsen
Use say() instead of print() where we can, to get a uniform prefix for all chatter (PB2 scripts). Almost all remaining prints are nedded to conform with current external (PB2) log parsers. |
1155 |
say(" ^--- Found running mysqld process(es), to be killed if possible.\n"); |
0.107.8
by John H. Embretsen
pb2gentest*.pl: Support vardir as relative path by adjusting pskill commands. |
1156 |
system('C:\bin\pskill mysqld > '.$vardir_abspath.'/pskill_mysqld.out 2>&1'); |
1157 |
system('C:\bin\pskill mysqld-nt > '.$vardir_abspath.'/pskill_mysqld-nt.out 2>&1'); |
|
0.99.27
by John H. Embretsen
Use say() instead of print() where we can, to get a uniform prefix for all chatter (PB2 scripts). Almost all remaining prints are nedded to conform with current external (PB2) log parsers. |
1158 |
} else { say(" None found.\n"); } |
0.80.4
by John H. Embretsen
pb2gentest: Kill remaining mysqld processes also on Windows (requires pskill from MS SysInternals PsTools). |
1159 |
|
1160 |
} else { |
|
1161 |
# Unix/Linux.
|
|
1162 |
# Avoid "bad argument count" messages from kill by checking if process exists first.
|
|
0.67.125
by John H. Embretsen
pb2gentest: Get rid of spurious error messages at end of runs (from kill and killall) by: |
1163 |
if (system("pgrep mysqld") == 0) { |
0.99.27
by John H. Embretsen
Use say() instead of print() where we can, to get a uniform prefix for all chatter (PB2 scripts). Almost all remaining prints are nedded to conform with current external (PB2) log parsers. |
1164 |
say(" ^--- Found running mysqld process(es), to be killed if possible.\n"); |
0.67.125
by John H. Embretsen
pb2gentest: Get rid of spurious error messages at end of runs (from kill and killall) by: |
1165 |
system("pgrep mysqld | xargs kill -15"); # "soft" kill |
1166 |
sleep(5); |
|
1167 |
if (system("pgrep mysqld > /dev/null") == 0) { |
|
1168 |
# process is still around...
|
|
1169 |
system("pgrep mysqld | xargs kill -9"); # "hard" kill |
|
1170 |
}
|
|
0.99.27
by John H. Embretsen
Use say() instead of print() where we can, to get a uniform prefix for all chatter (PB2 scripts). Almost all remaining prints are nedded to conform with current external (PB2) log parsers. |
1171 |
} else { say(" None found.\n"); } |
0.67.1
by Philip Stoev
initial import from internal tree |
1172 |
}
|
1173 |
||
0.99.27
by John H. Embretsen
Use say() instead of print() where we can, to get a uniform prefix for all chatter (PB2 scripts). Almost all remaining prints are nedded to conform with current external (PB2) log parsers. |
1174 |
say(" [$$] $0 will exit with exit status ".$command_result_shifted."\n"); |
0.67.124
by John H. Embretsen
pb2gentest: Simple MTR-style reporting of test results, for xref and PB2 (pass/fail only, no signature support yet). |
1175 |
POSIX::_exit ($command_result_shifted); |