projects
/
IRC.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0599396
)
tweak scripts to take mp3 filename argument
author
jjenista
<jjenista>
Wed, 26 Oct 2011 15:46:28 +0000
(15:46 +0000)
committer
jjenista
<jjenista>
Wed, 26 Oct 2011 15:46:28 +0000
(15:46 +0000)
Robust/src/Benchmarks/SSJava/MP3Decoder/observe-new-error-seed.sh
patch
|
blob
|
history
Robust/src/Benchmarks/SSJava/MP3Decoder/run-error.sh
patch
|
blob
|
history
Robust/src/Benchmarks/SSJava/MP3Decoder/run-normal.sh
patch
|
blob
|
history
diff --git
a/Robust/src/Benchmarks/SSJava/MP3Decoder/observe-new-error-seed.sh
b/Robust/src/Benchmarks/SSJava/MP3Decoder/observe-new-error-seed.sh
index ca3be5b3789e9ba5fb38416acfc41d52d0497446..c33ec7dd20096cd7fceb33add53bf97e7dcd7908 100755
(executable)
--- a/
Robust/src/Benchmarks/SSJava/MP3Decoder/observe-new-error-seed.sh
+++ b/
Robust/src/Benchmarks/SSJava/MP3Decoder/observe-new-error-seed.sh
@@
-1,15
+1,30
@@
#!/bin/bash
#!/bin/bash
+usage () {
+ echo 'usage:'
+ echo ' observe-new-error-seed <inv prob> <random seed> <mp3 filename>'
+}
+
+
if [[ -z $1 ]] ; then
if [[ -z $1 ]] ; then
- echo 'Please supply an inverse probability (e.g. 1000).'
+ usage
+ echo 'Please supply an inverse probability. (e.g. 1000)'
exit
fi
if [[ -z $2 ]] ; then
exit
fi
if [[ -z $2 ]] ; then
+ usage
echo 'Please supply a random seed.'
exit
fi
echo 'Please supply a random seed.'
exit
fi
+if [[ -z $3 ]] ; then
+ usage
+ echo 'Please supply an mp3 name. (e.g. focus.mp3)'
+ exit
+fi
+
+
trycommand () {
$1
if [[ ! $? ]] ; then
trycommand () {
$1
if [[ ! $? ]] ; then
@@
-18,9
+33,10
@@
trycommand () {
fi
}
fi
}
+
trycommand "make normal"
trycommand "make cleanerror"
trycommand "make error INV_ERROR_PROB=$1 RANDOMSEED=$2"
trycommand "make normal"
trycommand "make cleanerror"
trycommand "make error INV_ERROR_PROB=$1 RANDOMSEED=$2"
-trycommand "run-normal.sh"
-trycommand "run-error.sh"
+trycommand "run-normal.sh
$3
"
+trycommand "run-error.sh
$3
"
trycommand "plot-normal-vs-error.sh"
trycommand "plot-normal-vs-error.sh"
diff --git
a/Robust/src/Benchmarks/SSJava/MP3Decoder/run-error.sh
b/Robust/src/Benchmarks/SSJava/MP3Decoder/run-error.sh
index aebe29da77c581f0b2aae8be75f6216a673a79ff..ccd5ad87a302ae88f8e5ea9442ff9a99bf4b1195 100755
(executable)
--- a/
Robust/src/Benchmarks/SSJava/MP3Decoder/run-error.sh
+++ b/
Robust/src/Benchmarks/SSJava/MP3Decoder/run-error.sh
@@
-1,5
+1,11
@@
#!/bin/bash
#!/bin/bash
-MP3Playere.bin focus.mp3 > error.txt
+
+if [[ -z $1 ]] ; then
+ echo 'Please supply an mp3 file name.'
+ exit
+fi
+
+MP3Playere.bin $1 > error.txt
grep "SSJAVA: Injecting error" error.txt
grep "SSJAVA: Injecting error" error.txt
diff --git
a/Robust/src/Benchmarks/SSJava/MP3Decoder/run-normal.sh
b/Robust/src/Benchmarks/SSJava/MP3Decoder/run-normal.sh
index 9858108518a6142c613d3e262f357abc04cfd464..af28c67c2a7168e1c2c3ca40874c2d7a49d6ece4 100755
(executable)
--- a/
Robust/src/Benchmarks/SSJava/MP3Decoder/run-normal.sh
+++ b/
Robust/src/Benchmarks/SSJava/MP3Decoder/run-normal.sh
@@
-1,4
+1,10
@@
#!/bin/bash
#!/bin/bash
-MP3Playern.bin focus.mp3 > normal.txt
+
+if [[ -z $1 ]] ; then
+ echo 'Please supply an mp3 file name.'
+ exit
+fi
+
+MP3Playern.bin $1 > normal.txt
mp3samples2plotData.sh normal.txt
\ No newline at end of file
mp3samples2plotData.sh normal.txt
\ No newline at end of file