@@ -188,10 +188,10 @@ run_subsection () {
188
188
189
189
if test -z " $GIT_PERF_SEND_TO_CODESPEED "
190
190
then
191
- ./aggregate.perl $codespeed_opt " $@ "
191
+ ./aggregate.perl --results-dir= " $TEST_RESULTS_DIR " $codespeed_opt " $@ "
192
192
else
193
- json_res_file=" test-results /$GIT_PERF_SUBSECTION /aggregate.json"
194
- ./aggregate.perl --codespeed " $@ " | tee " $json_res_file "
193
+ json_res_file=" " $TEST_RESULTS_DIR " /$GIT_PERF_SUBSECTION /aggregate.json"
194
+ ./aggregate.perl --results-dir= " $TEST_RESULTS_DIR " -- codespeed " $@ " | tee " $json_res_file "
195
195
send_data_url=" $GIT_PERF_SEND_TO_CODESPEED /result/add/json/"
196
196
curl -v --request POST --data-urlencode " json=$( cat " $json_res_file " ) " " $send_data_url "
197
197
fi
@@ -203,10 +203,17 @@ get_var_from_env_or_config "GIT_PERF_SEND_TO_CODESPEED" "perf" "sendToCodespeed"
203
203
cd " $( dirname $0 ) "
204
204
. ../../GIT-BUILD-OPTIONS
205
205
206
- mkdir -p test-results
207
- get_subsections " perf" > test-results/run_subsections.names
206
+ if test -n " $TEST_OUTPUT_DIRECTORY "
207
+ then
208
+ TEST_RESULTS_DIR=" $TEST_OUTPUT_DIRECTORY /test-results"
209
+ else
210
+ TEST_RESULTS_DIR=test-results
211
+ fi
212
+
213
+ mkdir -p " $TEST_RESULTS_DIR "
214
+ get_subsections " perf" > " $TEST_RESULTS_DIR " /run_subsections.names
208
215
209
- if test $( wc -l < test-results /run_subsections.names) -eq 0
216
+ if test $( wc -l < " $TEST_RESULTS_DIR " /run_subsections.names) -eq 0
210
217
then
211
218
if test -n " $GIT_PERF_SUBSECTION "
212
219
then
@@ -222,10 +229,10 @@ then
222
229
)
223
230
elif test -n " $GIT_PERF_SUBSECTION "
224
231
then
225
- egrep " ^$GIT_PERF_SUBSECTION \$ " test-results /run_subsections.names > /dev/null ||
232
+ egrep " ^$GIT_PERF_SUBSECTION \$ " " $TEST_RESULTS_DIR " /run_subsections.names > /dev/null ||
226
233
die " subsection '$GIT_PERF_SUBSECTION ' not found in '$GIT_PERF_CONFIG_FILE '"
227
234
228
- egrep " ^$GIT_PERF_SUBSECTION \$ " test-results /run_subsections.names | while read -r subsec
235
+ egrep " ^$GIT_PERF_SUBSECTION \$ " " $TEST_RESULTS_DIR " /run_subsections.names | while read -r subsec
229
236
do
230
237
(
231
238
GIT_PERF_SUBSECTION=" $subsec "
243
250
echo " ======== Run for subsection '$GIT_PERF_SUBSECTION ' ========"
244
251
run_subsection " $@ "
245
252
)
246
- done < test-results /run_subsections.names
253
+ done < " $TEST_RESULTS_DIR " /run_subsections.names
247
254
fi
0 commit comments