smengcl commented on code in PR #11515:
URL: https://github.com/apache/ozone/pull/11515#discussion_r4276636787


##########
hadoop-ozone/dev-support/checks/junit.sh:
##########
@@ -75,13 +92,15 @@ for i in $(seq 1 ${ITERATIONS}); do
   if [[ ${ITERATIONS} -gt 1 ]]; then
     original_report_dir="${REPORT_DIR}"
     REPORT_DIR="${original_report_dir}/iteration${i}"
-    mkdir -p "${REPORT_DIR}"
   fi
 
-  mvn ${MAVEN_OPTIONS} 
-Dmaven-surefire-plugin.argLineAccessArgs="${OZONE_MODULE_ACCESS_ARGS}" "$@" 
"${PHASE}" \
-      | tee "${REPORT_DIR}/output.log"
+  mvn ${MAVEN_OPTIONS} 
-Dmaven-surefire-plugin.argLineAccessArgs="${OZONE_MODULE_ACCESS_ARGS}" "$@" 
${CLEAN} "${PHASE}" \
+      | tee output.log
   irc=$?
 
+  mkdir -p "${REPORT_DIR}"
+  mv -f output.log "${REPORT_DIR}"/

Review Comment:
   nit: if the run is cancelled, the SIGINT trap exits before the `mv`, leaving 
`output.log` in the repo root. Writing to a temp file would keep the repo clean.
   
   ```suggestion
     log=$(mktemp)
     mvn ${MAVEN_OPTIONS} 
-Dmaven-surefire-plugin.argLineAccessArgs="${OZONE_MODULE_ACCESS_ARGS}" "$@" 
${CLEAN} "${PHASE}" \
         | tee "${log}"
     irc=$?
   
     mkdir -p "${REPORT_DIR}"
     mv -f "${log}" "${REPORT_DIR}"/output.log
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to