-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinterface_aemg.sh
More file actions
37 lines (28 loc) · 932 Bytes
/
interface_aemg.sh
File metadata and controls
37 lines (28 loc) · 932 Bytes
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
TOOL_HOME=`dirname "$0"`
function generate {
$TOOL_HOME/major/bin/ant -f $TOOL_HOME/build.xml -Dmutation="=mml/all.mml.bin" clean compile.major || exit 1
}
function MBAvoidEquivalentMutants {
mkdir -p $TOOL_HOME/build/classes
mkdir -p $TOOL_HOME/src
path=$1
for program_dir in $path/*; do
rm -r $TOOL_HOME/src/*
program=`ls $program_dir | grep ".java"`
cp $program_dir/$program $TOOL_HOME/src
generate || exit 1
mkdir -p $program_dir/mutants
for mutant_path in $TOOL_HOME/mutants/*; do
mutant_name=`basename $mutant_path`
mp=`ls -d $mutant_path/* | head -n 1`
while [[ ! -f $mp ]]; do
mp=`ls -d $mp/* | head -n 1`
done
mutant="$mp"
cp $mutant $program_dir/mutants/$mutant_name.java
done;
# ls $TOOL_HOME/mutant
done
echo $path
}
"$@" || exit 1