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
40sh -c "xz -c < /dev/null > /dev/null"
41if [ $? -eq 0 -a $# -gt 1 ] ; then
42 echo 'Running speed tests'
43 for _tin in ${TEST_DIR}/*.xz ; do
44 echo "Unpacking $_tin..."
45 xz -cd < $_tin > ${TEST_DIR}/test_file
46 # Preread file to cheat benchmark!
47 cat ${TEST_DIR}/test_file > /dev/null
48 echo "Starting benchmarking for $_tin..."
49 $2 ${TEST_DIR}/test_file
50 if [ $? -ne 0 ] ; then
51 echo "Test: $_tin failed"
52 rm ${TEST_DIR}/test_file
53 exit 1
54 fi
55 rm ${TEST_DIR}/test_file
56 done
57fi
58
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
40sh -c "xz -c < /dev/null > /dev/null"
41if [ $? -eq 0 -a $# -gt 1 ] ; then
42 echo 'Running speed tests'
43 for _tin in ${TEST_DIR}/*.xz ; do
44 echo "Unpacking $_tin..."
45 xz -cd < $_tin > ${TEST_DIR}/test_file
46 # Preread file to cheat benchmark!
47 cat ${TEST_DIR}/test_file > /dev/null
48 echo "Starting benchmarking for $_tin..."
49 $2 ${TEST_DIR}/test_file
50 if [ $? -ne 0 ] ; then
51 echo "Test: $_tin failed"
52 rm ${TEST_DIR}/test_file
53 exit 1
54 fi
55 rm ${TEST_DIR}/test_file
56 done
57fi
58