Skip to content
This repository has been archived by the owner on Feb 20, 2021. It is now read-only.

Commit

Permalink
Win32 portability for tests: fix the syntax to invoke 'tail'.
Browse files Browse the repository at this point in the history
tail -nX file -> tail -X file
  • Loading branch information
enricogior committed Jun 8, 2015
1 parent c59c110 commit 91d01bf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 6 additions & 3 deletions tests/integration/aof.tcl
Expand Up @@ -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
}
Expand All @@ -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
}
Expand All @@ -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
}
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/aofrw.tcl
Expand Up @@ -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"
}
Expand Down

0 comments on commit 91d01bf

Please sign in to comment.