summaryrefslogtreecommitdiff
path: root/tests/support
diff options
context:
space:
mode:
Diffstat (limited to 'tests/support')
-rw-r--r--tests/support/util.tcl10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/support/util.tcl b/tests/support/util.tcl
index 08fea1faa..e4e420db7 100644
--- a/tests/support/util.tcl
+++ b/tests/support/util.tcl
@@ -908,6 +908,16 @@ proc delete_lines_with_pattern {filename tmpfilename pattern} {
file rename -force $tmpfilename $filename
}
+proc get_nonloopback_addr {} {
+ set addrlist [list {}]
+ catch { set addrlist [exec hostname -I] }
+ return [lindex $addrlist 0]
+}
+
+proc get_nonloopback_client {} {
+ return [redis [get_nonloopback_addr] [srv 0 "port"] 0 $::tls]
+}
+
# The following functions and variables are used only when running large-memory
# tests. We avoid defining them when not running large-memory tests because the
# global variables takes up lots of memory.