This makes the output from tests/run-all better.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
switch -glob -- $testfile {
tests/*.at {
- regsub {^tests/} $testfile {tests/tmp/} tt
- regsub {\.at$} $tt {} tt
+ regsub {^tests/} $testfile {} id
+ regsub {\.at$} $id {} id
+ set tt "tests/tmp/$id"
}
* {
+ set id "\[[info pid]\]"
set tt tests/tmp/[info pid]
}
}
proc timeout-abort {} {
send_log "\r\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
- error "aborting due to timeout"
+ error "$id: aborting due to timeout"
}
set timeout 10
proc elog {args} {
+ global id
set m "[list expect [lindex $args end]]"
- puts stderr $m
+ puts stderr "$id: $m"
# send_log "\n$m\n"
eval expect $args
}
source $testfile
-puts ok
+puts "$id: ok"