Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
79b4d29f
Commit
79b4d29f
authored
Oct 05, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge msvensson2.mysql.internal:mysql/mysql-5.0-maint
into pilot.mysql.com:/data/msvensson/mysql/mysql-5.0-maint
parents
28232df2
b5b89b8d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
12 deletions
+53
-12
client/mysqltest.c
client/mysqltest.c
+15
-4
mysql-test/lib/mtr_cases.pl
mysql-test/lib/mtr_cases.pl
+25
-3
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+10
-5
mysql-test/t/mysqltest.test
mysql-test/t/mysqltest.test
+3
-0
No files found.
client/mysqltest.c
View file @
79b4d29f
...
@@ -1580,10 +1580,21 @@ void check_result(DYNAMIC_STRING* ds)
...
@@ -1580,10 +1580,21 @@ void check_result(DYNAMIC_STRING* ds)
and then show the diff
and then show the diff
*/
*/
char
reject_file
[
FN_REFLEN
];
char
reject_file
[
FN_REFLEN
];
str_to_file
(
fn_format
(
reject_file
,
result_file_name
,
opt_logdir
,
".reject"
,
dirname_part
(
reject_file
,
result_file_name
);
*
opt_logdir
?
MY_REPLACE_DIR
|
MY_REPLACE_EXT
:
MY_REPLACE_EXT
),
if
(
access
(
reject_file
,
W_OK
)
==
0
)
ds
->
str
,
ds
->
length
);
{
/* Result file directory is writable, save reject file there */
fn_format
(
reject_file
,
result_file_name
,
NULL
,
".reject"
,
MY_REPLACE_EXT
);
}
else
{
/* Put reject file in opt_logdir */
fn_format
(
reject_file
,
result_file_name
,
opt_logdir
,
".reject"
,
MY_REPLACE_DIR
|
MY_REPLACE_EXT
);
}
str_to_file
(
reject_file
,
ds
->
str
,
ds
->
length
);
dynstr_set
(
ds
,
NULL
);
/* Don't create a .log file */
dynstr_set
(
ds
,
NULL
);
/* Don't create a .log file */
...
...
mysql-test/lib/mtr_cases.pl
View file @
79b4d29f
...
@@ -27,6 +27,26 @@ sub collect_one_test_case ($$$$$$$);
...
@@ -27,6 +27,26 @@ sub collect_one_test_case ($$$$$$$);
sub
mtr_options_from_test_file
($$);
sub
mtr_options_from_test_file
($$);
my
$do_test
;
my
$skip_test
;
sub
init_pattern
{
my
(
$from
,
$what
)
=
@_
;
if
(
$from
=~
/[a-z0-9]/
)
{
# Does not contain any regex, make the pattern match
# beginning of string
$from
=
"
^
$from
";
}
else
{
# Check that pattern is a valid regex
eval
{
""
=~
/$from/
;
1
}
or
mtr_error
("
Invalid regex '
$from
' passed to
$what
\n
Perl says: $@
");
}
return
$from
;
}
##############################################################################
##############################################################################
#
#
# Collect information about test cases we are to run
# Collect information about test cases we are to run
...
@@ -39,6 +59,9 @@ sub collect_test_cases ($) {
...
@@ -39,6 +59,9 @@ sub collect_test_cases ($) {
my
$testdir
;
my
$testdir
;
my
$resdir
;
my
$resdir
;
$do_test
=
init_pattern
(
$::opt_do_test
,
"
--do-test
");
$skip_test
=
init_pattern
(
$::opt_skip_test
,
"
--skip-test
");
if
(
$suite
eq
"
main
"
)
if
(
$suite
eq
"
main
"
)
{
{
$testdir
=
"
$::glob_mysql_test_dir/t
";
$testdir
=
"
$::glob_mysql_test_dir/t
";
...
@@ -162,8 +185,7 @@ sub collect_test_cases ($) {
...
@@ -162,8 +185,7 @@ sub collect_test_cases ($) {
}
}
# Skip tests that does not match the --do-test= filter
# Skip tests that does not match the --do-test= filter
next
if
$::opt_do_test
and
next
if
(
$do_test
and
not
$tname
=~
/$do_test/o
);
!
defined
mtr_match_prefix
(
$elem
,
$::opt_do_test
);
collect_one_test_case
(
$testdir
,
$resdir
,
$tname
,
$elem
,
$cases
,
\%
disabled
,
collect_one_test_case
(
$testdir
,
$resdir
,
$tname
,
$elem
,
$cases
,
\%
disabled
,
$component_id
);
$component_id
);
...
@@ -288,7 +310,7 @@ sub collect_one_test_case($$$$$$$) {
...
@@ -288,7 +310,7 @@ sub collect_one_test_case($$$$$$$) {
# Skip some tests but include in list, just mark them to skip
# Skip some tests but include in list, just mark them to skip
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
if
(
$
::opt_skip_test
and
defined
mtr_match_prefix
(
$tname
,
$::opt_skip_test
)
)
if
(
$
skip_test
and
$tname
=~
/$skip_test/o
)
{
{
$tinfo
->
{'
skip
'}
=
1
;
$tinfo
->
{'
skip
'}
=
1
;
return
;
return
;
...
...
mysql-test/mysql-test-run.pl
View file @
79b4d29f
...
@@ -1334,12 +1334,13 @@ sub datadir_list_setup () {
...
@@ -1334,12 +1334,13 @@ sub datadir_list_setup () {
sub
collect_mysqld_features
()
{
sub
collect_mysqld_features
()
{
my
$found_variable_list_start
=
0
;
my
$found_variable_list_start
=
0
;
my
$tmpdir
=
tempdir
(
CLEANUP
=>
0
);
# Directory removed by this function
#
#
# Execute "mysqld --no-defaults --help --verbose" to get a
# Execute "mysqld --no-defaults --help --verbose" to get a
# list of all features and settings
# list of all features and settings
#
#
my
$list
=
`
$exe_mysqld
--no-defaults --verbose --help
`;
my
$list
=
`
$exe_mysqld
--no-defaults --
datadir=
$tmpdir
--
verbose --help
`;
foreach
my
$line
(
split
('
\
n
',
$list
))
foreach
my
$line
(
split
('
\
n
',
$list
))
{
{
...
@@ -1394,7 +1395,7 @@ sub collect_mysqld_features () {
...
@@ -1394,7 +1395,7 @@ sub collect_mysqld_features () {
}
}
}
}
}
}
rmtree
(
$tmpdir
);
mtr_error
("
Could not find version of MySQL
")
unless
$mysql_version_id
;
mtr_error
("
Could not find version of MySQL
")
unless
$mysql_version_id
;
mtr_error
("
Could not find variabes list
")
unless
$found_variable_list_start
;
mtr_error
("
Could not find variabes list
")
unless
$found_variable_list_start
;
...
@@ -5006,7 +5007,7 @@ sub valgrind_arguments {
...
@@ -5006,7 +5007,7 @@ sub valgrind_arguments {
}
}
# Add valgrind options, can be overriden by user
# Add valgrind options, can be overriden by user
mtr_add_arg
(
$args
,
'
%s
',
$
_
)
for
(
split
('
',
$opt_valgrind_options
)
);
mtr_add_arg
(
$args
,
'
%s
',
$
opt_valgrind_options
);
mtr_add_arg
(
$args
,
$$exe
);
mtr_add_arg
(
$args
,
$$exe
);
...
@@ -5079,12 +5080,16 @@ Options to control what test suites or cases to run
...
@@ -5079,12 +5080,16 @@ Options to control what test suites or cases to run
skip-ndb[cluster] Skip all tests that need cluster
skip-ndb[cluster] Skip all tests that need cluster
skip-ndb[cluster]-slave Skip all tests that need a slave cluster
skip-ndb[cluster]-slave Skip all tests that need a slave cluster
ndb-extra Run extra tests from ndb directory
ndb-extra Run extra tests from ndb directory
do-test=PREFIX Run test cases which name are prefixed with PREFIX
do-test=PREFIX or REGEX
Run test cases which name are prefixed with PREFIX
or fulfills REGEX
skip-test=PREFIX or REGEX
Skip test cases which name are prefixed with PREFIX
or fulfills REGEX
start-from=PREFIX Run test cases starting from test prefixed with PREFIX
start-from=PREFIX Run test cases starting from test prefixed with PREFIX
suite=NAME Run the test suite named NAME. The default is "main"
suite=NAME Run the test suite named NAME. The default is "main"
skip-rpl Skip the replication test cases.
skip-rpl Skip the replication test cases.
skip-im Don't start IM, and skip the IM test cases
skip-im Don't start IM, and skip the IM test cases
skip-test=PREFIX Skip test cases which name are prefixed with PREFIX
big-test Set the environment variable BIG_TEST, which can be
big-test Set the environment variable BIG_TEST, which can be
checked from test cases.
checked from test cases.
...
...
mysql-test/t/mysqltest.test
View file @
79b4d29f
...
@@ -1435,7 +1435,10 @@ select "this will be executed";
...
@@ -1435,7 +1435,10 @@ select "this will be executed";
--
exec
$MYSQL_TEST
-
x
$MYSQLTEST_VARDIR
/
tmp
/
query
.
sql
-
R
$MYSQLTEST_VARDIR
/
tmp
/
zero_length_file
.
result
>
/
dev
/
null
2
>&
1
--
exec
$MYSQL_TEST
-
x
$MYSQLTEST_VARDIR
/
tmp
/
query
.
sql
-
R
$MYSQLTEST_VARDIR
/
tmp
/
zero_length_file
.
result
>
/
dev
/
null
2
>&
1
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
zero_length_file
.
result
;
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
zero_length_file
.
result
;
--
error
0
,
1
remove_file
$MYSQLTEST_VARDIR
/
log
/
zero_length_file
.
reject
;
remove_file
$MYSQLTEST_VARDIR
/
log
/
zero_length_file
.
reject
;
--
error
0
,
1
remove_file
$MYSQL_TEST_DIR
/
r
/
zero_length_file
.
reject
;
#
#
# Test that a test file that does not generate any output fails.
# Test that a test file that does not generate any output fails.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment