21 lines
562 B
Bash
Executable File
21 lines
562 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# Check that the elapsed time counter does count up.
|
|
|
|
true "${testSubject:?not set - call this from 'make check'}"
|
|
true "${workFile1:?not set - call this from 'make check'}"
|
|
|
|
# Transfer a zero amount of data, but take 3 seconds to do it.
|
|
#
|
|
(sleep 3 | "${testSubject}" -f -t >/dev/null) 2>&1 | tr '\r' '\n' > "${workFile1}"
|
|
|
|
# Count the number of different timer values; it should be >1.
|
|
#
|
|
valueCount=$(sort < "${workFile1}" | uniq -u | wc -l | tr -dc '0-9')
|
|
if ! test "${valueCount}" -gt 1; then
|
|
echo "timer value did not change"
|
|
exit 1
|
|
fi
|
|
|
|
exit 0
|