#! /bin/shPWD_DIR=$PWD#################################################################################Function: run the program for specified times#Para1: test program path#Para2: command to be run#Para3: test program output log#Para4: repeat run times################################################################################function runTest(){#cd $1#export PWD=## ToDo: judge whether the bash/mksh is exist, use the $4 to set repeat times#if[-z which bash];then# for ((i=0; i<$4; i++)); do# echo abc# done#else#fipwdechoPARA1=$1echoPARA2=$2echoPARA3=$3for i in 12345678910;doeval"$2"2>&1| tee -a $3done#cp $PWD_DIR/$1/$3 $PWD_DIR/#cd $PWD_DIR}#Para1: test program path #Para2: command to be run #Para3: test program output log #Para4: repeat run times#runTest classic_benchmarks/source_code 'echo 0x30 |./dhry2' dhry2.log 10#runTest classic_benchmarks/source_code './dhry2' dhry2.log 10#runTest classic_benchmarks/source_code 'echo | ./dhry2' dhry2.log 10#runTest lmbench/bin/arm-linux './lat_ops' lat_ops.log#runTest lmbench/bin/arm-linux './lat_mem_rd 1M' lat_mem_rd.log#runTest coremark_v1.0 'time ./coremark.exe 0x0 0x0 0x66 200000 7 1 2000' coremark.log runTest coremark_v1.0 'time ./coremark.exe 0x0 0x0 0x66 200000 7 1 2000' coremark.log
runTest classic_benchmarks/source_code 'echo | ./dhry2' dhry2.log 10runTest lmbench/bin/arm-linux './lat_ops' lat_ops.log
runTest lmbench/bin/arm-linux './lat_mem_rd 1M' lat_mem_rd.log
exit0
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.