forked from schemaanalyst/schemaanalyst
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-mutant-timing.sh
executable file
·42 lines (35 loc) · 1014 Bytes
/
run-mutant-timing.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
#!/bin/bash
# Arguments (: separated)
# -s SCHEMAS
# -r REPEATS
# -d DBMSS
CLASSPATH='build/classes/main:lib/*:build/lib/*:.'
CLASS='org.schemaanalyst.util.Go'
TECHNIQUE='mutantTiming'
while getopts s:r:d: option
do
case "${option}" in
s) SCHEMAS=${OPTARG};;
r) REPEATS=${OPTARG};;
d) DBMSS=${OPTARG};;
esac
done
if [ -z $SCHEMAS ] || [ -z $REPEATS ] || [ -z $DBMSS ]; then
echo "Experiment failed - requires -s SCHEMAS -r REPEATS -d DBMSS"
exit 1
fi
IFS=':' read -ra SCHEMA <<< "$SCHEMAS"
IFS=':' read -ra DBMS <<< "$DBMSS"
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 --schema parsedcasestudy.$s --dbms $d mutation --technique=$TECHNIQUE
done
done
done