Skip to content

Commit

Permalink
[#906] improved logging during test execution
Browse files Browse the repository at this point in the history
  • Loading branch information
remkop committed Jan 16, 2020
1 parent e10b178 commit 87e0476
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
7 changes: 4 additions & 3 deletions src/test/dejagnu.tests/lib/completions/basicExample.exp
Expand Up @@ -7,14 +7,15 @@ proc teardown {} {
}

proc run_completion_test {cmd test candidates} {
send_log "\nTESTING: $test\n";
verbose "Sending ${cmd}\t..."
send "${cmd}\t"

expect "${cmd}\r\n"
expect {
-re $candidates { pass "$test" }
-re /@ { unresolved "$test at prompt" }
default { unresolved "$test" }
-re $candidates { send_log "\n"; pass "$test" }
-re /@ { send_log "\n"; unresolved "$test at prompt" }
default { send_log "\n"; unresolved "$test" }
}
sync_after_int
}
Expand Down
14 changes: 8 additions & 6 deletions src/test/dejagnu.tests/lib/completions/picocompletion-demo.exp
Expand Up @@ -8,27 +8,29 @@ proc teardown {} {
}

proc run_completion_test {cmd test candidates} {
send_log "\nTESTING: $test\n";
verbose "Sending ${cmd}\t..."
send "${cmd}\t"

expect "${cmd}\r\n"
expect {
-re $candidates { pass "$test" }
-re /@ { unresolved "$test at prompt" }
default { unresolved "$test" }
-re $candidates { send_log "\n"; pass "$test" }
-re /@ { send_log "\n"; unresolved "$test at prompt" }
default { send_log "\n"; unresolved "$test" }
}
sync_after_int
}

proc run_completion_test_glob {cmd test candidates} {
send_log "\nTESTING: $test\n";
verbose "Sending ${cmd}\t..."
send "${cmd}\t"

expect "${cmd}\r\n"
expect {
-gl $candidates { pass "$test" }
-re /@ { unresolved "$test at prompt" }
default { unresolved "$test" }
-gl $candidates { send_log "\n"; pass "$test" }
-re /@ { send_log "\n"; unresolved "$test at prompt" }
default { send_log "\n"; unresolved "$test" }
}
sync_after_int
}
Expand Down

0 comments on commit 87e0476

Please sign in to comment.