run-benchmarks.sh 989 Bytes
Newer Older
1 2
#!/bin/bash

3
benchmarks=( 'mist' 'wahl-kroening' 'soter' )
4 5 6 7 8 9 10 11 12 13 14 15 16 17
extensions=( 'spec' )
executable='../../slapnet'

for benchmark in ${benchmarks[@]}; do
  benchmark_dir="$benchmark"
  >$benchmark_dir/positive-slapnet.list
  >$benchmark_dir/dontknow-slapnet.list
  >$benchmark_dir/timeout-slapnet.list
  >$benchmark_dir/error-slapnet.list
  for ext in ${extensions[@]}; do
    for file in `find $benchmark_dir -name "*.$ext"`; do
      T="$(date +%s%N)"
      (
        set -o pipefail;
18
        timeout 60 $executable --$ext --no-given-properties --termination-by-reachability -o $file.terminating $file | tee $file.out
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
      )
      result=$?
      T=$(($(date +%s%N)-T))
      if [[ result -eq 0 ]]; then
          list='positive'
      elif [[ result -eq 2 ]]; then
          list='dontknow'
      elif [[ result -eq 124 || result -eq 137 ]]; then
          list='timeout'
      else
          list='error'
      fi
      echo $T $file >>$benchmark_dir/$list-slapnet.list
    done
  done
done