Win32 portability for tests: fix the syntax to invoke 'tail'.
tail -nX file -> tail -X file
This commit is contained in:
@@ -88,8 +88,9 @@ tags {"aof"} {
|
||||
test "Bad format: Server should have logged an error" {
|
||||
set pattern "*Bad file format reading the append only file*"
|
||||
set retry 10
|
||||
#WIN_PORT_FIX 'tail -n1' -> 'tail -1'
|
||||
while {$retry} {
|
||||
set result [exec tail -n1 < [dict get $srv stdout]]
|
||||
set result [exec tail -1 < [dict get $srv stdout]]
|
||||
if {[string match $pattern $result]} {
|
||||
break
|
||||
}
|
||||
@@ -113,8 +114,9 @@ tags {"aof"} {
|
||||
test "Unfinished MULTI: Server should have logged an error" {
|
||||
set pattern "*Unexpected end of file reading the append only file*"
|
||||
set retry 10
|
||||
#WIN_PORT_FIX 'tail -n1' -> 'tail -1'
|
||||
while {$retry} {
|
||||
set result [exec tail -n1 < [dict get $srv stdout]]
|
||||
set result [exec tail -1 < [dict get $srv stdout]]
|
||||
if {[string match $pattern $result]} {
|
||||
break
|
||||
}
|
||||
@@ -137,8 +139,9 @@ tags {"aof"} {
|
||||
test "Short read: Server should have logged an error" {
|
||||
set pattern "*Unexpected end of file reading the append only file*"
|
||||
set retry 10
|
||||
#WIN_PORT_FIX 'tail -n1' -> 'tail -1'
|
||||
while {$retry} {
|
||||
set result [exec tail -n1 < [dict get $srv stdout]]
|
||||
set result [exec tail -1 < [dict get $srv stdout]]
|
||||
if {[string match $pattern $result]} {
|
||||
break
|
||||
}
|
||||
|
||||
@@ -69,8 +69,9 @@ start_server {tags {"aofrw"}} {
|
||||
r bgrewriteaof
|
||||
r config set appendonly no
|
||||
r exec
|
||||
#WIN_PORT_FIX 'tail -n5' -> 'tail -5'
|
||||
wait_for_condition 50 100 {
|
||||
[string match {*Killing*AOF*child*} [exec tail -n5 < [srv 0 stdout]]]
|
||||
[string match {*Killing*AOF*child*} [exec tail -5 < [srv 0 stdout]]]
|
||||
} else {
|
||||
fail "Can't find 'Killing AOF child' into recent logs"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user