Home | History | Annotate | Download | only in omnetpp
      1 #!/bin/bash -ux
      2 
      3 cd /usr/local/google/home/yuhenglong/Desktop/spec2006/cpu2006-redhat-ia32/
      4 cd benchspec/CPU2006/471.omnetpp/run/build_base_test$1.0000
      5 
      6 (time ./omnetpp$1 ../../data/train/input/omnetpp.ini) 1>log-file 2>time.txt
      7 
      8 state=$?
      9 
     10 if [ $state -eq 0 ];then
     11   diff ../../data/train/output/omnetpp.sca.result omnetpp.sca
     12   state=$?
     13   if [ $state -eq 0 ];then
     14     time=$(cat time.txt | grep real | cut -f2 -s | cut -d 's' -f 1)
     15     time=$(echo $time | awk -Fm '{ print ($1 * 60) + $2 }')
     16     echo $time
     17   else
     18     echo "error"
     19   fi
     20 else
     21   echo "error"
     22 fi
     23 
     24 return $state