freebsd-nq/contrib/libucl/tests/speed.test
Baptiste Daroussin 97bd480fe3 Update to 20140321
This brings schema validation

MFC after:	1 week
2014-03-22 17:28:14 +00:00

22 lines
504 B
Bash
Executable File

#!/bin/sh
PROG=${TEST_BINARY_DIR}/test_speed
sh -c "xz -c < /dev/null > /dev/null"
echo 'Running speed tests'
for _tin in ${TEST_DIR}/*.xz ; do
echo "Unpacking $_tin..."
xz -cd < $_tin > ${TEST_OUT_DIR}/test_file
# Preread file to cheat benchmark!
cat ${TEST_OUT_DIR}/test_file > /dev/null
echo "Starting benchmarking for $_tin..."
$PROG ${TEST_OUT_DIR}/test_file
if [ $? -ne 0 ] ; then
echo "Test: $_tin failed"
rm ${TEST_OUT_DIR}/test_file
exit 1
fi
rm ${TEST_OUT_DIR}/test_file
done