@@ -188,10 +188,10 @@ run_subsection () {
188188
189189 if test -z " $GIT_PERF_SEND_TO_CODESPEED "
190190 then
191- ./aggregate.perl $codespeed_opt " $@ "
191+ ./aggregate.perl --results-dir= " $TEST_RESULTS_DIR " $codespeed_opt " $@ "
192192 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 "
195195 send_data_url=" $GIT_PERF_SEND_TO_CODESPEED /result/add/json/"
196196 curl -v --request POST --data-urlencode " json=$( cat " $json_res_file " ) " " $send_data_url "
197197 fi
@@ -203,10 +203,17 @@ get_var_from_env_or_config "GIT_PERF_SEND_TO_CODESPEED" "perf" "sendToCodespeed"
203203cd " $( dirname $0 ) "
204204. ../../GIT-BUILD-OPTIONS
205205
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
208215
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
210217then
211218 if test -n " $GIT_PERF_SUBSECTION "
212219 then
@@ -222,10 +229,10 @@ then
222229 )
223230elif test -n " $GIT_PERF_SUBSECTION "
224231then
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 ||
226233 die " subsection '$GIT_PERF_SUBSECTION ' not found in '$GIT_PERF_CONFIG_FILE '"
227234
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
229236 do
230237 (
231238 GIT_PERF_SUBSECTION=" $subsec "
243250 echo " ======== Run for subsection '$GIT_PERF_SUBSECTION ' ========"
244251 run_subsection " $@ "
245252 )
246- done < test-results /run_subsections.names
253+ done < " $TEST_RESULTS_DIR " /run_subsections.names
247254fi
0 commit comments