Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
22ccc6db
Commit
22ccc6db
authored
Jan 24, 2013
by
Johan Bergström
Committed by
antirez
Feb 05, 2013
Browse files
Use `info nameofexectuable` to find current executable
parent
f9a8b0ec
Changes
3
Hide whitespace changes
Inline
Side-by-side
tests/integration/replication-4.tcl
View file @
22ccc6db
proc start_bg_complex_data
{
host port db ops
}
{
proc start_bg_complex_data
{
host port db ops
}
{
exec tclsh8.5 tests/helpers/bg_complex_data.tcl $host $port $db $ops &
set tclsh
[
info nameofexecutable
]
exec $tclsh tests/helpers/bg_complex_data.tcl $host $port $db $ops &
}
}
proc stop_bg_complex_data
{
handle
}
{
proc stop_bg_complex_data
{
handle
}
{
...
...
tests/integration/replication.tcl
View file @
22ccc6db
...
@@ -78,7 +78,8 @@ start_server {tags {"repl"}} {
...
@@ -78,7 +78,8 @@ start_server {tags {"repl"}} {
}
}
proc start_write_load
{
host port seconds
}
{
proc start_write_load
{
host port seconds
}
{
exec tclsh8.5 tests/helpers/gen_write_load.tcl $host $port $seconds &
set tclsh
[
info nameofexecutable
]
exec $tclsh tests/helpers/gen_write_load.tcl $host $port $seconds &
}
}
proc stop_write_load
{
handle
}
{
proc stop_write_load
{
handle
}
{
...
...
tests/test_helper.tcl
View file @
22ccc6db
...
@@ -178,6 +178,7 @@ proc find_available_port start {
...
@@ -178,6 +178,7 @@ proc find_available_port start {
proc test_server_main
{}
{
proc test_server_main
{}
{
cleanup
cleanup
set tclsh
[
info nameofexecutable
]
# Open a listening socket, trying different ports in order to find a
# Open a listening socket, trying different ports in order to find a
# non busy one.
# non busy one.
set port
[
find_available_port 11111
]
set port
[
find_available_port 11111
]
...
@@ -191,7 +192,7 @@ proc test_server_main {} {
...
@@ -191,7 +192,7 @@ proc test_server_main {} {
set start_port
[
expr
{
$::port
+100
}]
set start_port
[
expr
{
$::port
+100
}]
for
{
set j 0
}
{
$j
< $::numclients
}
{
incr j
}
{
for
{
set j 0
}
{
$j
< $::numclients
}
{
incr j
}
{
set start_port
[
find_available_port $start_port
]
set start_port
[
find_available_port $start_port
]
set p
[
exec tclsh
8.5
[
info script
]
{*}
$::argv
\
set p
[
exec
$
tclsh
[
info script
]
{*}
$::argv
\
--client $port --port $start_port &
]
--client $port --port $start_port &
]
lappend ::clients_pids $p
lappend ::clients_pids $p
incr start_port 10
incr start_port 10
...
...
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