#!/bin/sh

run_test() {
	test_case=$1
	test_run=$2

	while [ $test_run -gt 0 ]; do
		echo
		echo "time ./extest $test_case $3"
		time ./extest $test_case $3
		test_run=`expr $test_run - 1`
		echo
	done
}

call_depth=1
while [ $call_depth -le 5 ]; do
	run_test 1 10 $call_depth
	call_depth=`expr $call_depth + 1`
done

call_depth=1
while [ $call_depth -le 5 ]; do
	run_test 2 10 $call_depth
	call_depth=`expr $call_depth + 1`
done

call_depth=1
while [ $call_depth -le 5 ]; do
	run_test 3 10 $call_depth
	call_depth=`expr $call_depth + 1`
done

call_depth=1
while [ $call_depth -le 5 ]; do
	run_test 4 10 $call_depth
	call_depth=`expr $call_depth + 1`
done
