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
3230e97d
Commit
3230e97d
authored
Oct 11, 2000
by
mwagner@evoq.home.mwagner.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mysql-test-run Added Serg's SysV/BSD changes. Reworked timing
mysql-test-run to be more accurate and portable.
parent
284aa787
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
29 deletions
+50
-29
mysql-test/mysql-test-run
mysql-test/mysql-test-run
+50
-29
No files found.
mysql-test/mysql-test-run
View file @
3230e97d
...
@@ -4,8 +4,8 @@
...
@@ -4,8 +4,8 @@
# Access Definitions
# Access Definitions
#--
#--
DB
=
test
DB
=
test
USER
=
test
DB
USER
=
test
PASSWD
=
DB
PASSWD
=
#++
#++
# Misc. Definitions
# Misc. Definitions
...
@@ -21,8 +21,11 @@ TESTSUFFIX=test
...
@@ -21,8 +21,11 @@ TESTSUFFIX=test
TOT_PASS
=
0
TOT_PASS
=
0
TOT_FAIL
=
0
TOT_FAIL
=
0
TOT_TEST
=
0
TOT_TEST
=
0
TIME_FORMAT
=
'%U\t%S\t%E\t%P'
USERT
=
0
DASHBLANK
=
"----
\t
----
\t
-------
\t
----"
SYST
=
0
REALT
=
0
TIMEFILE
=
"
$CWD
/var/tmp/mysqltest-time"
DASHBLANK
=
"---- ---- -------"
[
-z
$COLUMNS
]
&&
COLUMNS
=
80
[
-z
$COLUMNS
]
&&
COLUMNS
=
80
E
=
`
expr
$COLUMNS
- 8
`
E
=
`
expr
$COLUMNS
- 8
`
...
@@ -47,25 +50,30 @@ MYERR="$CWD/var/log/mysqld.err"
...
@@ -47,25 +50,30 @@ MYERR="$CWD/var/log/mysqld.err"
#++
#++
# Program Definitions
# Program Definitions
#--
#--
BASENAME
=
/bin/basename
CAT
=
/bin/cat
CUT
=
/usr/bin/cut
ECHO
=
/bin/echo
ECHO
=
/bin/echo
EXPR
=
/usr/bin/expr
EXPR
=
/usr/bin/expr
PRINTF
=
/usr/bin/printf
PRINTF
=
/usr/bin/printf
RM
=
/bin/rm
TIME
=
/usr/bin/time
TIME
=
/usr/bin/time
TR
=
/usr/bin/tr
MYSQLD
=
"
$BASEDIR
/sql/mysqld"
MYSQLD
=
"
$BASEDIR
/sql/mysqld"
MYSQL_TEST
=
"
$BASEDIR
/client/mysqltest"
MYSQL_TEST
=
"
$BASEDIR
/client/mysqltest"
MYSQLADMIN
=
"
$BASEDIR
/client/mysqladmin"
MYSQLADMIN
=
"
$BASEDIR
/client/mysqladmin"
MYSQL_TEST
=
"
$MYSQL_TEST
--socket=
$MYSOCK
--database=
$DB
--user=
$
USER
--password=
$
PASSWD
--silent"
MYSQL_TEST
=
"
$MYSQL_TEST
--socket=
$MYSOCK
--database=
$DB
--user=
$
DBUSER
--password=
$DB
PASSWD
--silent"
INSTALL_DB
=
"
$MYBIN
/mysql-test_install_db"
INSTALL_DB
=
"
$MYBIN
/mysql-test_install_db"
#++
#++
# Terminal Modifications
# Terminal Modifications
#--
#--
MOVE_TO_COL
=
"
$ECHO
-
en
\\
033[300C
\\
033
[20D"
MOVE_TO_COL
=
"
$ECHO
-
n [300C
[20D"
SETCOLOR_SUCCESS
=
"
$ECHO
-
en
\\
033
[1;32m"
SETCOLOR_SUCCESS
=
"
$ECHO
-
n
[1;32m"
SETCOLOR_FAILURE
=
"
$ECHO
-
en
\\
033
[1;31m"
SETCOLOR_FAILURE
=
"
$ECHO
-
n
[1;31m"
SETCOLOR_WARNING
=
"
$ECHO
-
en
\\
033
[1;33m"
SETCOLOR_WARNING
=
"
$ECHO
-
n
[1;33m"
SETCOLOR_NORMAL
=
"
$ECHO
-
en
\\
033
[0;39m"
SETCOLOR_NORMAL
=
"
$ECHO
-
n
[0;39m"
...
@@ -160,14 +168,14 @@ mysql_install_db () {
...
@@ -160,14 +168,14 @@ mysql_install_db () {
mysql_start
()
{
mysql_start
()
{
`
$MYSQLD
--no-defaults
\
$MYSQLD
--no-defaults
\
--skip-networking
\
--skip-networking
\
--basedir
=
$CWD
\
--basedir
=
$CWD
\
--datadir
=
$MYDDIR
\
--datadir
=
$MYDDIR
\
--pid-file
=
$MYPID
\
--pid-file
=
$MYPID
\
--socket
=
$MYSOCK
\
--socket
=
$MYSOCK
\
--log
=
$MYLOG
\
--log
=
$MYLOG
\
--language
=
english
>>
$MYERR
2>&1 &
`
--language
=
english
>>
$MYERR
2>&1 &
return
1
return
1
}
}
...
@@ -218,30 +226,42 @@ $SETCOLOR_NORMAL && $ECHO -n "Starting Tests for MySQL $TESTVER Series"
...
@@ -218,30 +226,42 @@ $SETCOLOR_NORMAL && $ECHO -n "Starting Tests for MySQL $TESTVER Series"
$SETCOLOR_SUCCESS
&&
echo_ok
$SETCOLOR_SUCCESS
&&
echo_ok
$ECHO
$ECHO
$ECHO
-e
" TEST
\t\t\t
USER
\t
SYSTEM
\t
ELAPSED
\t
%CPU
\t
RESULT"
$ECHO
" TEST USER SYSTEM ELAPSED
RESULT"
$ECHO
$DASH72
$ECHO
$DASH72
for
tf
in
$TESTDIR
/
*
.
$TESTSUFFIX
for
tf
in
$TESTDIR
/
*
.
$TESTSUFFIX
do
do
if
[
-f
$tf
]
;
then
if
[
-f
$tf
]
;
then
mytime
=
`
$TIME
-
f
$TIME_FORMAT
$MYSQL_TEST
<
$tf
2>&1
`
mytime
=
`
$TIME
-
p
$MYSQL_TEST
<
$tf
2>
$TIMEFILE
`
res
=
$?
res
=
$?
tf
=
`
basename
$tf
`
if
[
$res
!=
1
]
;
then
mytime
=
`
$CAT
$TIMEFILE
|
$TR
'\n'
'-'
`
USERT
=
`
$ECHO
$mytime
|
$CUT
-d
-
-f
2 |
$CUT
-d
' '
-f
2
`
SYST
=
`
$ECHO
$mytime
|
$CUT
-d
-
-f
3 |
$CUT
-d
' '
-f
2
`
REALT
=
`
$ECHO
$mytime
|
$CUT
-d
-
-f
1 |
$CUT
-d
' '
-f
2
`
else
USERT
=
"...."
SYST
=
"...."
REALT
=
"...."
fi
timestr
=
"
$USERT
$SYST
$REALT
"
tf
=
`
$BASENAME
$tf
`
$SETCOLOR_NORMAL
&&
$ECHO
-n
"
$tf
$timestr
"
[
$res
=
1
]
&&
mytime
=
`
$ECHO
-ne
$mytime
|
cut
-b
39-
`
$SETCOLOR_NORMAL
&&
$ECHO
-ne
"
$tf
\t
$mytime
"
[
$res
=
1
]
&&
fail_inc
&&
echo_fail
[
$res
!=
1
]
&&
pass_inc
&&
echo_pass
[
$res
!=
1
]
&&
pass_inc
&&
echo_pass
[
$res
=
1
]
&&
fail_inc
&&
echo_fail
total_inc
total_inc
if
[
$res
!=
0
]
;
then
if
[
$res
!=
0
]
;
then
$ECHO
$ECHO
$SETCOLOR_NORMAL
&&
$ECHO
-n
e
"Restarting mysqld
\t
$DASHBLANK
"
$SETCOLOR_NORMAL
&&
$ECHO
-n
"Restarting mysqld
$DASHBLANK
"
mysql_restart
mysql_restart
$SETCOLOR_SUCCESS
&&
echo_ok
$SETCOLOR_SUCCESS
&&
echo_ok
$SETCOLOR_NORMAL
&&
$ECHO
-n
e
"Resuming Tests
\t\t
$DASHBLANK
"
$SETCOLOR_NORMAL
&&
$ECHO
-n
"Resuming Tests
$DASHBLANK
"
$SETCOLOR_SUCCESS
&&
echo_ok
$SETCOLOR_SUCCESS
&&
echo_ok
$ECHO
$ECHO
fi
fi
...
@@ -252,6 +272,7 @@ $ECHO $DASH72
...
@@ -252,6 +272,7 @@ $ECHO $DASH72
$ECHO
$ECHO
$SETCOLOR_NORMAL
&&
$ECHO
-n
"Ending Tests for MySQL
$TESTVER
Series"
$SETCOLOR_NORMAL
&&
$ECHO
-n
"Ending Tests for MySQL
$TESTVER
Series"
$SETCOLOR_SUCCESS
&&
echo_ok
$SETCOLOR_SUCCESS
&&
echo_ok
$RM
$TIMEFILE
$SETCOLOR_NORMAL
&&
$ECHO
-n
"Shutdown mysqld"
$SETCOLOR_NORMAL
&&
$ECHO
-n
"Shutdown mysqld"
mysql_stop
mysql_stop
...
...
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