changes: now Inference engine works fine with the EyeTracking benchmark.
[IRC.git] / Robust / src / Benchmarks / SSJava / MP3Decoder / observe-new-error-seed.sh
1 #!/bin/bash
2
3 usage () {
4   echo 'usage:'
5   echo '  observe-new-error-seed <inv prob> <random seed> <mp3 filename>'
6 }
7
8
9 if [[ -z $1 ]] ; then
10   usage
11   echo 'Please supply an inverse probability. (e.g. 1000)'
12   exit
13 fi
14
15 if [[ -z $2 ]] ; then
16   usage
17   echo 'Please supply a random seed.'
18   exit
19 fi
20
21 if [[ -z $3 ]] ; then
22   usage
23   echo 'Please supply an mp3 name. (e.g. focus.mp3)'
24   exit
25 fi
26
27
28 trycommand () {
29   $1
30   if [[ ! $? ]] ; then
31     echo "FAILED: $1"
32     exit
33   fi  
34 }
35
36
37 trycommand "make normal"
38 trycommand "make cleanerror"
39 trycommand "make error INV_ERROR_PROB=$1 RANDOMSEED=$2"
40 trycommand "run-normal.sh $3"
41 trycommand "run-error.sh $3"
42 trycommand "plot-normal-vs-error.sh"