Improve test script performance, note issues with slow machines
This commit is contained in:
@@ -159,3 +159,9 @@ extension unavailable in BSD implementations
|
||||
It's fairly simple to test each of these scripts independently, but
|
||||
the entire chain is a bit prone to behaving oddly in hard-to-debug
|
||||
ways. `set -x` is your friend here.
|
||||
|
||||
The test scripts are a bit fragile about timeouts. They will
|
||||
generally run correctly on an unloaded machine without the `make -j`
|
||||
flag. Using `make -j` is obviously very convenient for development,
|
||||
and it works fine on faster machines, but I don't recommend it for
|
||||
automated testing.
|
||||
|
||||
@@ -15,7 +15,7 @@ sleepf()
|
||||
(sleep .1 || sleep 1) > /dev/null 2>&1
|
||||
}
|
||||
|
||||
seq()
|
||||
seq_function()
|
||||
{
|
||||
if [ $# -lt 1 -o $# -gt 3 ]; then
|
||||
echo "bad args" >&2
|
||||
@@ -36,13 +36,20 @@ seq()
|
||||
esac
|
||||
while :; do
|
||||
printf '%d\n' $first
|
||||
first=$(expr $first + $incr)
|
||||
first=$(( first + incr ))
|
||||
if [ $first -gt $last ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
if ! seq 1 > /dev/null 2>&1; then
|
||||
seq()
|
||||
{
|
||||
seq_function "$@"
|
||||
}
|
||||
fi
|
||||
|
||||
chr()
|
||||
{
|
||||
printf "\\$(printf %03o $1)"
|
||||
|
||||
@@ -23,7 +23,9 @@ baseline()
|
||||
|
||||
# ASCII, then ISO-8859-1.
|
||||
for char in $(seq 32 126) $(seq 160 255) ; do
|
||||
printf '%02x %s ' $char "$(utf8cp $char)"
|
||||
printf '%02x ' $char
|
||||
utf8cp $char
|
||||
printf ' '
|
||||
done
|
||||
printf '\n'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user