1#!/bin/sh 2 3if [ $# -lt 1 ] ; then 4 echo 'Specify binary to run as the first argument' 5 exit 1 6fi 7 8 --- 23 unchanged lines hidden (view full) --- 32 if [ $? -ne 0 ] ; then 33 rm ${TEST_DIR}/generate.out 34 echo "Test: generate.res output missmatch" 35 exit 1 36 fi 37 rm ${TEST_DIR}/generate.out 38fi 39 |
40if [ $# -gt 3 ] ; then 41 rm /tmp/_ucl_test_schema.out ||true 42 for i in ${TEST_DIR}/schema/*.json ; do 43 _name=`basename $i` 44 printf "running schema test suite $_name... " 45 cat $i | $4 >> /tmp/_ucl_test_schema.out && ( echo "OK" ) || ( echo "Fail" ) 46 done 47fi 48 |
49sh -c "xz -c < /dev/null > /dev/null" 50if [ $? -eq 0 -a $# -gt 1 ] ; then 51 echo 'Running speed tests' 52 for _tin in ${TEST_DIR}/*.xz ; do 53 echo "Unpacking $_tin..." 54 xz -cd < $_tin > ${TEST_DIR}/test_file 55 # Preread file to cheat benchmark! 56 cat ${TEST_DIR}/test_file > /dev/null 57 echo "Starting benchmarking for $_tin..." 58 $2 ${TEST_DIR}/test_file 59 if [ $? -ne 0 ] ; then 60 echo "Test: $_tin failed" 61 rm ${TEST_DIR}/test_file 62 exit 1 63 fi 64 rm ${TEST_DIR}/test_file 65 done 66fi 67 |