提交 91d01bf8 编写于 作者: E Enrico Giordani

Win32 portability for tests: fix the syntax to invoke 'tail'.

tail -nX file -> tail -X file
上级 c59c110e
...@@ -88,8 +88,9 @@ tags {"aof"} { ...@@ -88,8 +88,9 @@ tags {"aof"} {
test "Bad format: Server should have logged an error" { test "Bad format: Server should have logged an error" {
set pattern "*Bad file format reading the append only file*" set pattern "*Bad file format reading the append only file*"
set retry 10 set retry 10
#WIN_PORT_FIX 'tail -n1' -> 'tail -1'
while {$retry} { 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]} { if {[string match $pattern $result]} {
break break
} }
...@@ -113,8 +114,9 @@ tags {"aof"} { ...@@ -113,8 +114,9 @@ tags {"aof"} {
test "Unfinished MULTI: Server should have logged an error" { test "Unfinished MULTI: Server should have logged an error" {
set pattern "*Unexpected end of file reading the append only file*" set pattern "*Unexpected end of file reading the append only file*"
set retry 10 set retry 10
#WIN_PORT_FIX 'tail -n1' -> 'tail -1'
while {$retry} { 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]} { if {[string match $pattern $result]} {
break break
} }
...@@ -137,8 +139,9 @@ tags {"aof"} { ...@@ -137,8 +139,9 @@ tags {"aof"} {
test "Short read: Server should have logged an error" { test "Short read: Server should have logged an error" {
set pattern "*Unexpected end of file reading the append only file*" set pattern "*Unexpected end of file reading the append only file*"
set retry 10 set retry 10
#WIN_PORT_FIX 'tail -n1' -> 'tail -1'
while {$retry} { 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]} { if {[string match $pattern $result]} {
break break
} }
......
...@@ -69,8 +69,9 @@ start_server {tags {"aofrw"}} { ...@@ -69,8 +69,9 @@ start_server {tags {"aofrw"}} {
r bgrewriteaof r bgrewriteaof
r config set appendonly no r config set appendonly no
r exec r exec
#WIN_PORT_FIX 'tail -n5' -> 'tail -5'
wait_for_condition 50 100 { 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 { } else {
fail "Can't find 'Killing AOF child' into recent logs" fail "Can't find 'Killing AOF child' into recent logs"
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册