summaryrefslogtreecommitdiffstats
path: root/contrib/libucl/tests/speed.test
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libucl/tests/speed.test')
-rwxr-xr-xcontrib/libucl/tests/speed.test21
1 files changed, 21 insertions, 0 deletions
diff --git a/contrib/libucl/tests/speed.test b/contrib/libucl/tests/speed.test
new file mode 100755
index 0000000..34db653
--- /dev/null
+++ b/contrib/libucl/tests/speed.test
@@ -0,0 +1,21 @@
+#!/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
+
OpenPOWER on IntegriCloud