mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
shtests: More speedups; also fix xtrace (re: 734e5953)
This reduces a bunch more unnecessarily long sleeps to give asynchronous processes time to run, etc. (No, we don't need to be compatible anymore with your cool 1985 Intel 80386DX 16 MHz battlestation...) Running the test suite is almost tolerable now, making me much more likely to actually run the regression test suite and catch my own regressions. In addition, there are various fixes to make the test suite compatible with 'set -x' ('set -o xtrace') so that you can now actually *use* the documented 'bin/shtests -x' option. Recommend combining with '-p' to avoid tracing everything three times. I've also added a really useful $PS4 trace prompt to shtests that traces pretty much everything there is to trace. (It does use expansions that modify ${.sh.match}, which affected several tests, particularly in tests/substring.sh; for those we need to set a temporary simpler $PS4.) (cherry picked from commit c3a5d47cfe880b526cabb5370ddaced0e8626acd)
This commit is contained in:
parent
ba1f2ba9c3
commit
712261c89b
15 changed files with 178 additions and 120 deletions
|
@ -385,7 +385,7 @@ do arg=$1 val=$2 code=$3
|
|||
shift 3
|
||||
for fmt in '%d' '%g'
|
||||
do out=$(printf "$fmt" "$arg" 2>/dev/null)
|
||||
err=$(printf "$fmt" "$arg" 2>&1 >/dev/null)
|
||||
err=$(set +x; printf "$fmt" "$arg" 2>&1 >/dev/null)
|
||||
printf "$fmt" "$arg" >/dev/null 2>&1
|
||||
ret=$?
|
||||
[[ $out == $val ]] || err_exit "printf $fmt $arg failed -- expected '$val', got '$out'"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue