Improve test script performance, note issues with slow machines

This commit is contained in:
John Hood
2016-04-01 20:06:45 -04:00
parent 7196dfdb26
commit bd2e8fc746
3 changed files with 18 additions and 3 deletions
+9 -2
View File
@@ -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)"