mirror of
https://github.com/fluencelabs/redis
synced 2025-03-31 14:51:04 +00:00
ability to select port/host from make test
This commit is contained in:
parent
8ca3e9d10b
commit
fb765a0ae3
4
Makefile
4
Makefile
@ -13,6 +13,8 @@ else
|
|||||||
endif
|
endif
|
||||||
CCOPT= $(CFLAGS) $(CCLINK) $(ARCH) $(PROF)
|
CCOPT= $(CFLAGS) $(CCLINK) $(ARCH) $(PROF)
|
||||||
DEBUG?= -g -rdynamic -ggdb
|
DEBUG?= -g -rdynamic -ggdb
|
||||||
|
HOST?= 127.0.0.1
|
||||||
|
PORT?= 6379
|
||||||
|
|
||||||
OBJ = adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o
|
OBJ = adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o
|
||||||
BENCHOBJ = ae.o anet.o redis-benchmark.o sds.o adlist.o zmalloc.o
|
BENCHOBJ = ae.o anet.o redis-benchmark.o sds.o adlist.o zmalloc.o
|
||||||
@ -79,7 +81,7 @@ staticsymbols:
|
|||||||
tclsh utils/build-static-symbols.tcl > staticsymbols.h
|
tclsh utils/build-static-symbols.tcl > staticsymbols.h
|
||||||
|
|
||||||
test:
|
test:
|
||||||
tclsh test-redis.tcl
|
tclsh test-redis.tcl -p $(PORT) -h $(HOST)
|
||||||
|
|
||||||
bench:
|
bench:
|
||||||
./redis-benchmark
|
./redis-benchmark
|
||||||
|
@ -226,8 +226,8 @@ proc datasetDigest r {
|
|||||||
return $digest
|
return $digest
|
||||||
}
|
}
|
||||||
|
|
||||||
proc main {server port} {
|
proc main {} {
|
||||||
set r [redis $server $port]
|
set r [redis $::host $::port]
|
||||||
$r select 9
|
$r select 9
|
||||||
set err ""
|
set err ""
|
||||||
set res ""
|
set res ""
|
||||||
@ -2008,7 +2008,7 @@ proc main {server port} {
|
|||||||
} {1 1}
|
} {1 1}
|
||||||
|
|
||||||
test {PIPELINING stresser (also a regression for the old epoll bug)} {
|
test {PIPELINING stresser (also a regression for the old epoll bug)} {
|
||||||
set fd2 [socket 127.0.0.1 6379]
|
set fd2 [socket $::host $::port]
|
||||||
fconfigure $fd2 -encoding binary -translation binary
|
fconfigure $fd2 -encoding binary -translation binary
|
||||||
puts -nonewline $fd2 "SELECT 9\r\n"
|
puts -nonewline $fd2 "SELECT 9\r\n"
|
||||||
flush $fd2
|
flush $fd2
|
||||||
@ -2113,7 +2113,7 @@ proc main {server port} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proc stress {} {
|
proc stress {} {
|
||||||
set r [redis]
|
set r [redis $::host $::port]
|
||||||
$r select 9
|
$r select 9
|
||||||
$r flushdb
|
$r flushdb
|
||||||
while 1 {
|
while 1 {
|
||||||
@ -2182,7 +2182,7 @@ for {set j 0} {$j < [llength $argv]} {incr j} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Before to run the test check if DB 9 and DB 10 are empty
|
# Before to run the test check if DB 9 and DB 10 are empty
|
||||||
set r [redis]
|
set r [redis $::host $::port]
|
||||||
|
|
||||||
if {$::flush} {
|
if {$::flush} {
|
||||||
$r flushall
|
$r flushall
|
||||||
@ -2201,8 +2201,9 @@ unset r
|
|||||||
unset db9size
|
unset db9size
|
||||||
unset db10size
|
unset db10size
|
||||||
|
|
||||||
|
puts "Testing Redis, host $::host, port $::port"
|
||||||
if {$::stress} {
|
if {$::stress} {
|
||||||
stress
|
stress
|
||||||
} else {
|
} else {
|
||||||
main $::host $::port
|
main
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user