summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJohan Bergström <bugs@bergstroem.nu>2013-01-24 09:37:18 +1100
committerantirez <antirez@gmail.com>2013-02-05 11:44:55 +0100
commitd2a8bca82bd05310934f75e7bdbf1f107c3d8676 (patch)
tree3dbc6b6297b57f7a819e16ca410eb99ffa36569d /tests
parent1124cda37a5dff6379afd611a095adfca87ed57a (diff)
downloadredis-d2a8bca82bd05310934f75e7bdbf1f107c3d8676.tar.gz
Use `info nameofexectuable` to find current executable
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/replication-4.tcl3
-rw-r--r--tests/integration/replication.tcl3
-rw-r--r--tests/test_helper.tcl3
3 files changed, 6 insertions, 3 deletions
diff --git a/tests/integration/replication-4.tcl b/tests/integration/replication-4.tcl
index 69fcab373..0a0dcdc2b 100644
--- a/tests/integration/replication-4.tcl
+++ b/tests/integration/replication-4.tcl
@@ -1,5 +1,6 @@
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} {
diff --git a/tests/integration/replication.tcl b/tests/integration/replication.tcl
index da94b0880..5ca6449f4 100644
--- a/tests/integration/replication.tcl
+++ b/tests/integration/replication.tcl
@@ -78,7 +78,8 @@ start_server {tags {"repl"}} {
}
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} {
diff --git a/tests/test_helper.tcl b/tests/test_helper.tcl
index aeff69f7e..483774219 100644
--- a/tests/test_helper.tcl
+++ b/tests/test_helper.tcl
@@ -178,6 +178,7 @@ proc find_available_port start {
proc test_server_main {} {
cleanup
+ set tclsh [info nameofexecutable]
# Open a listening socket, trying different ports in order to find a
# non busy one.
set port [find_available_port 11111]
@@ -191,7 +192,7 @@ proc test_server_main {} {
set start_port [expr {$::port+100}]
for {set j 0} {$j < $::numclients} {incr j} {
set start_port [find_available_port $start_port]
- set p [exec tclsh8.5 [info script] {*}$::argv \
+ set p [exec $tclsh [info script] {*}$::argv \
--client $port --port $start_port &]
lappend ::clients_pids $p
incr start_port 10