555
556
command = /home/sb/tests/msb_5_1_30/stop
558
Perl based test scripts
559
In addition to the internal script language, you can also define perl
560
scripts, which will be able to call routines defined inside
561
test_sandbox. (see list below) To be identified as a Perl script, the
562
user defined test must have the extension ".sb.pl"
565
The "ok_shell" function requires a hash reference containing the
566
following labels: A 'command', which is passed to a shell. The
567
'expected' label is a string that you expect to find within the shell
568
output. If you don't expect anything, you can just say "expected =
569
OK", meaning that you will be satisfied with a ZERO exit code
570
reported by the operating system. The 'msg' is the description of the
571
test that is shown to you when the test runs.
575
command => 'make_sandbox 5.1.30 --no_confirm',
576
expected => 'sandbox server started',
577
msg => 'sandbox creation',
581
The "ok_sql" function requires a hashref containing the following
582
labels: A 'path', which is the place where the test engine expects to
583
find a 'use' script. The 'query' is passed to the above mentioned
584
script and the output is captured for further processing. The
585
'expected' parameter is a string that you want to find in the query
586
output. The 'msg' parameter is like the one used with the ok_exec
590
This function accepts one parameter, which can be either a MySQL
591
tarball name or a version, and returns the bare version found in the
592
input string. If called in list mode, it returns also a normalized
593
version string with dots replaced by underscores.
595
my $version = get_bare_version('5.1.30');
598
my $version = get_bare_version('mysql-5.1.30-OS.tar.gz');
601
my ($version,$dir_name) = get_bare_version('mysql-5.1.30-OS.tar.gz');
602
# returns ('5.1.30', '5_1_30')
604
See the test script t/start_restart_arguments.sb.pl as an example
558
To use this package you need at least the following:
560
* Linux or Mac OSX operating system (it may work in other *NIX OSs, but
563
* A binary tarball of MySQL 3.23 or later
565
* Perl 5.8.1 or later
607
To use this package you need at least the following:
609
* Linux or Mac OSX operating system (it may work in other *NIX OSs,
610
but has not been tested)
612
* A binary tarball of MySQL 3.23 or later
614
* Perl 5.8.1 or later
572
Copyright (C) 2006,2007,2008,2009 Giuseppe Maxia
574
Home Page http://launchpad.net/mysql-sandbox/
621
Copyright (C) 2006,2007,2008,2009 Giuseppe Maxia
623
Home Page http://launchpad.net/mysql-sandbox/
577
This program is free software; you can redistribute it and/or modify it
578
under the terms of the GNU General Public License as published by the
579
Free Software Foundation; version 2 of the License.
581
This program is distributed in the hope that it will be useful, but
582
WITHOUT ANY WARRANTY; without even the implied warranty of
583
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
584
Public License for more details.
586
You should have received a copy of the GNU General Public License along
587
with this program; if not, write to the Free Software Foundation, Inc.,
588
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
626
This program is free software; you can redistribute it and/or modify
627
it under the terms of the GNU General Public License as published by
628
the Free Software Foundation; version 2 of the License.
630
This program is distributed in the hope that it will be useful, but
631
WITHOUT ANY WARRANTY; without even the implied warranty of
632
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
633
General Public License for more details.
635
You should have received a copy of the GNU General Public License
636
along with this program; if not, write to the Free Software
637
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301