-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsubj-para.sh
executable file
·204 lines (185 loc) · 7.63 KB
/
subj-para.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
# Usage: subj-para.sh $DT_SUBJ $DT_ROOT $SUBJ_NAME $SUBJ_NAME_FORMAL $NEW_DT_SUBJ true false true ...
# Usage: subj-para.sh $DT_SUBJ $DT_ROOT $SUBJ_NAME $SUBJ_NAME_FORMAL $NEW_DT_SUBJ false false true $DT_TOOLS $DT_LIBS $DT_CLASS $DT_RANDOOP $DT_TESTS
source ./constants.sh
DT_SUBJ=$1
DT_ROOT=$2
SUBJ_NAME=$3
SUBJ_NAME_FORMAL=$4
NEW_DT_SUBJ=$5
PRESET_CP=$6
if [ "$PRESET_CP" = "true" ]; then
CLASSPATH=$9
else
DT_TOOLS=$9
DT_LIBS=${10}
DT_CLASS=${11}
DT_RANDOOP=${12}
DT_TESTS=${13}
CLASSPATH=$DT_LIBS:$DT_CLASS:$DT_RANDOOP:$DT_TESTS:$DT_TOOLS
fi
PRECOMPUTE_DEPENDENCES=$7
GEN_ENHANCED_RESULTS=$8
if ! bash check-compiled.sh $CLASSPATH; then
exit 1
fi
# Set the pwd dependening on classpath/version
. set-directory.sh $DT_SUBJ $NEW_DT_SUBJ $CLASSPATH
for post in "${postProcessFlags[@]}"; do
if [ "$post" = "" ]; then
p=false
else
p=true
fi
for j in "${testTypes[@]}"; do
if [ "$GEN_ENHANCED_RESULTS" = "true" ]; then
echo "[INFO] Running prioritization for $j test type"
java -cp $DT_TOOLS: edu.washington.cs.dt.impact.runner.OneConfigurationRunner \
-technique prioritization \
-coverage statement \
-order original \
-origOrder $NEW_DT_SUBJ/$SUBJ_NAME-$j-order \
-testInputDir $DT_SUBJ/sootTestOutput-$j \
-filesToDelete $NEW_DT_SUBJ/$SUBJ_NAME-env-files \
-project "$SUBJ_NAME_FORMAL" \
-testType $j \
-outputDir $DT_ROOT/$paraDir \
-timesToRun $medianTimes \
-getCoverage \
-classpath "$CLASSPATH" \
$post
fi
for k in "${machines[@]}"; do
PRECOMPUTE_FLAG=""
if [ "$PRECOMPUTE_DEPENDENCES" = "true" ]; then
PRECOMPUTE_FLAG="-resolveDependences $PARA_DT_LISTS/parallelization-$SUBJ_NAME_FORMAL-$j-$k-original-$p.txt"
fi
# [INFO] Running parallelization with resolveDependences and without dependentTestFile for original order
echo "[DEBUG] java -cp $DT_TOOLS: edu.washington.cs.dt.impact.runner.OneConfigurationRunner \
-technique parallelization \
-order original \
-origOrder $NEW_DT_SUBJ/$SUBJ_NAME-$j-order \
-testInputDir $DT_SUBJ/sootTestOutput-$j \
-filesToDelete $NEW_DT_SUBJ/$SUBJ_NAME-env-files \
-project \"$SUBJ_NAME_FORMAL\" \
-testType $j \
-numOfMachines $k \
-outputDir $DT_ROOT/$paraDir \
-timesToRun $medianTimes \
-classpath \"$CLASSPATH\" \
$PRECOMPUTE_FLAG \
$post"
java -cp $DT_TOOLS: edu.washington.cs.dt.impact.runner.OneConfigurationRunner \
-technique parallelization \
-order original \
-origOrder $NEW_DT_SUBJ/$SUBJ_NAME-$j-order \
-testInputDir $DT_SUBJ/sootTestOutput-$j \
-filesToDelete $NEW_DT_SUBJ/$SUBJ_NAME-env-files \
-project "$SUBJ_NAME_FORMAL" \
-testType $j \
-numOfMachines $k \
-outputDir $DT_ROOT/$paraDir \
-timesToRun $medianTimes \
-classpath "$CLASSPATH" \
$PRECOMPUTE_FLAG \
$post
if [ "$GEN_ENHANCED_RESULTS" = "true" ]; then
echo "[DEBUG] java -cp $DT_TOOLS: edu.washington.cs.dt.impact.runner.OneConfigurationRunner \
-technique parallelization \
-order original \
-origOrder $NEW_DT_SUBJ/$SUBJ_NAME-$j-order \
-testInputDir $DT_SUBJ/sootTestOutput-$j \
-filesToDelete $NEW_DT_SUBJ/$SUBJ_NAME-env-files \
-project "$SUBJ_NAME_FORMAL" \
-testType $j \
-numOfMachines $k \
-outputDir $DT_ROOT/$paraDir \
-timesToRun $medianTimes \
-classpath \"$CLASSPATH\" \
-dependentTestFile $PARA_DT_LISTS/\"parallelization-$SUBJ_NAME_FORMAL-$j-$k-original-$p.txt\" \
$post"
java -cp $DT_TOOLS: edu.washington.cs.dt.impact.runner.OneConfigurationRunner \
-technique parallelization \
-order original \
-origOrder $NEW_DT_SUBJ/$SUBJ_NAME-$j-order \
-testInputDir $DT_SUBJ/sootTestOutput-$j \
-filesToDelete $NEW_DT_SUBJ/$SUBJ_NAME-env-files \
-project "$SUBJ_NAME_FORMAL" \
-testType $j \
-numOfMachines $k \
-outputDir $DT_ROOT/$paraDir \
-timesToRun $medianTimes \
-classpath "$CLASSPATH" \
-dependentTestFile $PARA_DT_LISTS/"parallelization-$SUBJ_NAME_FORMAL-$j-$k-original-$p.txt" \
$post
fi
PRECOMPUTE_FLAG=""
if [ "$PRECOMPUTE_DEPENDENCES" = "true" ]; then
PRECOMPUTE_FLAG="-resolveDependences $PARA_DT_LISTS/parallelization-$SUBJ_NAME_FORMAL-$j-$k-time-$p.txt"
fi
# [INFO] Running parallelization with resolveDependences and without dependentTestFile for time order
echo "[DEBUG] java -cp $DT_TOOLS: edu.washington.cs.dt.impact.runner.OneConfigurationRunner \
-technique parallelization \
-order time \
-timeOrder $DT_SUBJ/$SUBJ_NAME-$j-time.txt \
-origOrder $NEW_DT_SUBJ/$SUBJ_NAME-$j-order \
-testInputDir $DT_SUBJ/sootTestOutput-$j \
-filesToDelete $NEW_DT_SUBJ/$SUBJ_NAME-env-files \
-numOfMachines $k \
-project "$SUBJ_NAME_FORMAL" \
-testType $j \
-timesToRun $medianTimes \
-outputDir $DT_ROOT/$paraDir \
-classpath \"$CLASSPATH\" \
$PRECOMPUTE_FLAG \
$post"
java -cp $DT_TOOLS: edu.washington.cs.dt.impact.runner.OneConfigurationRunner \
-technique parallelization \
-order time \
-timeOrder $DT_SUBJ/$SUBJ_NAME-$j-time.txt \
-origOrder $NEW_DT_SUBJ/$SUBJ_NAME-$j-order \
-testInputDir $DT_SUBJ/sootTestOutput-$j \
-filesToDelete $NEW_DT_SUBJ/$SUBJ_NAME-env-files \
-numOfMachines $k \
-project "$SUBJ_NAME_FORMAL" \
-testType $j \
-timesToRun $medianTimes \
-outputDir $DT_ROOT/$paraDir \
-classpath "$CLASSPATH" \
$PRECOMPUTE_FLAG \
$post
if [ "$GEN_ENHANCED_RESULTS" = "true" ]; then
echo "[DEBUG] java -cp $DT_TOOLS: edu.washington.cs.dt.impact.runner.OneConfigurationRunner \
-technique parallelization \
-order time \
-timeOrder $DT_SUBJ/$SUBJ_NAME-$j-time.txt \
-origOrder $NEW_DT_SUBJ/$SUBJ_NAME-$j-order \
-testInputDir $DT_SUBJ/sootTestOutput-$j \
-filesToDelete $NEW_DT_SUBJ/$SUBJ_NAME-env-files \
-numOfMachines $k \
-project "$SUBJ_NAME_FORMAL" \
-testType $j \
-timesToRun $medianTimes \
-outputDir $DT_ROOT/$paraDir \
-classpath $CLASSPATH \
-dependentTestFile $PARA_DT_LISTS/\"parallelization-$SUBJ_NAME_FORMAL-$j-$k-time-$p.txt\" \
$post"
java -cp $DT_TOOLS: edu.washington.cs.dt.impact.runner.OneConfigurationRunner \
-technique parallelization \
-order time \
-timeOrder $DT_SUBJ/$SUBJ_NAME-$j-time.txt \
-origOrder $NEW_DT_SUBJ/$SUBJ_NAME-$j-order \
-testInputDir $DT_SUBJ/sootTestOutput-$j \
-filesToDelete $NEW_DT_SUBJ/$SUBJ_NAME-env-files \
-numOfMachines $k \
-project "$SUBJ_NAME_FORMAL" \
-testType $j \
-timesToRun $medianTimes \
-outputDir $DT_ROOT/$paraDir \
-classpath "$CLASSPATH" \
-dependentTestFile $PARA_DT_LISTS/"parallelization-$SUBJ_NAME_FORMAL-$j-$k-time-$p.txt" \
$post
fi
done
clearTemp
done
done