Copilot commented on code in PR #11320:
URL: https://github.com/apache/ozone/pull/11320#discussion_r4099697682


##########
hadoop-ozone/dev-support/checks/junit.sh:
##########
@@ -54,10 +54,26 @@ if [[ -f 
hadoop-ozone/dist/src/shell/ozone/ozone-functions.sh ]]; then
   ozone_java_setup
 fi
 
-mvn ${MAVEN_OPTIONS} clean
-
-if [[ ${ITERATIONS} -gt 1 ]] && [[ ${OZONE_REPO_CACHED} == "false" ]]; then
-  mvn ${MAVEN_OPTIONS} -DskipTests install
+MAVEN_LIFECYCLE="verify"
+PL_ARGS=()
+if [[ "${OZONE_REPO_CACHED}" == "true" ]]; then
+  MAVEN_LIFECYCLE="test"
+  if [[ "${CHECK}" == "integration" ]]; then
+    # test-* profiles configure Surefire on the root POM; matching tests can 
live in any module
+    # (e.g. test-om in ozone-manager and ozone-integration-test). Use 
full-reactor mvn test.
+    # hadoop-native-lib is bound on ozone-main (inherited=false).
+    if [[ "$*" == *"-Phadoop-native-lib"* ]]; then
+      if ! mvn ${MAVEN_OPTIONS} -pl :ozone-main -Phadoop-native-lib 
generate-resources; then

Review Comment:
   This command inherits `--fail-never` from `MAVEN_OPTIONS` (line 47), so 
Maven can return success even when the native-library download or symlink 
execution fails. In that case the `if !` guard will not fail fast as intended 
and the subsequent test run will use a missing/incomplete `target/native-lib`; 
remove/override `--fail-never` for this bootstrap invocation (for example, add 
`--fail-fast` after the shared options).



-- 
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