forked from schemaanalyst/schemaanalyst
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun-analysepipeline.sh
executable file
·47 lines (40 loc) · 1.09 KB
/
run-analysepipeline.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
# Arguments (: separated)
# -s SCHEMAS
# -r REPEATS
# -d DBMSS
# -p PIPELINES
CLASSPATH='lib/*:build/'
CLASS='org.schemaanalyst.mutation.analysis.util.AnalysePipeline'
while getopts s:r:d:p: option
do
case "${option}"
in
s) SCHEMAS=${OPTARG};;
r) REPEATS=${OPTARG};;
d) DBMSS=${OPTARG};;
p) PIPELINES=${OPTARG};;
esac
done
if [ -z $SCHEMAS ] || [ -z $REPEATS ] || [ -z $DBMSS ] || [ -z $PIPELINES ]; then
echo "Experiment failed - requires -s SCHEMAS -r REPEATS -d DBMSS -p PIPELINES"
exit 1
fi
IFS=':' read -ra SCHEMA <<< "$SCHEMAS"
IFS=':' read -ra DBMS <<< "$DBMSS"
IFS=':' read -ra PIPELINE <<< "$PIPELINES"
for p in "${PIPELINE[@]}"; do
for d in "${DBMS[@]}"; do
if [ -f config/database.properties.local ]; then
scripts/updateproperties.sh -f config/database.properties.local -k dbms -v $d
else
scripts/updateproperties.sh -f config/database.properties -k dbms -v $d
fi
for (( x=1; x<=$REPEATS; x++ )) do
for s in "${SCHEMA[@]}"; do
echo "$d,$x,$s"
java -cp $CLASSPATH $CLASS parsedcasestudy.$s $d --mutationPipeline=$p
done
done
done
done