Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
846bcd9a
Commit
846bcd9a
authored
Dec 07, 2011
by
antirez
Browse files
Redis test: handle inability to start the server in a better way.
parent
fb293ccb
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/support/server.tcl
View file @
846bcd9a
...
@@ -2,13 +2,14 @@ set ::global_overrides {}
...
@@ -2,13 +2,14 @@ set ::global_overrides {}
set ::tags
{}
set ::tags
{}
set ::valgrind_errors
{}
set ::valgrind_errors
{}
proc error_and_quit
{
config_file error
}
{
proc start_server_error
{
config_file error
}
{
puts
"!!COULD NOT START REDIS-SERVER
\n
"
set err
{}
puts
"CONFIGURATION:"
append err
"Cant' start the Redis server
\n
"
puts
[
exec cat $config_file
]
append err
"CONFIGURATION:"
puts
"
\n
ERROR:"
append err
[
exec cat $config_file
]
puts
[
string trim $error
]
append err
"
\n
ERROR:"
exit 1
append err
[
string trim $error
]
send_data_packet $::test_server_fd err $err
}
}
proc check_valgrind_errors stderr
{
proc check_valgrind_errors stderr
{
...
@@ -209,7 +210,10 @@ proc start_server {options {code undefined}} {
...
@@ -209,7 +210,10 @@ proc start_server {options {code undefined}} {
}
}
if
{
!$serverisup
}
{
if
{
!$serverisup
}
{
error_and_quit $config_file
[
exec cat $stderr
]
set err
{}
append err
[
exec cat $stdout
]
"
\n
"
[
exec cat $stderr
]
start_server_error $config_file $err
return
}
}
# find out the pid
# find out the pid
...
...
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