automate trying different error probabilities and seeds
[IRC.git] / Robust / src / Benchmarks / SSJava / MP3Decoder / observe-new-error-seed.sh
1 #!/bin/bash
2
3 if [[ -z $1 ]] ; then
4   echo 'Please supply an inverse probability (e.g. 1000).'
5   exit
6 fi
7
8 if [[ -z $2 ]] ; then
9   echo 'Please supply a random seed.'
10   exit
11 fi
12
13 trycommand () {
14   $1
15   if [[ ! $? ]] ; then
16     echo "FAILED: $1"
17     exit
18   fi  
19 }
20
21 trycommand "make normal"
22 trycommand "make cleanerror"
23 trycommand "make error INV_ERROR_PROB=$1 RANDOMSEED=$2"
24 trycommand "run-normal.sh"
25 trycommand "run-error.sh"
26 trycommand "plot-normal-vs-error.sh"