sarvekshayr commented on code in PR #11911:
URL: https://github.com/apache/ozone/pull/11911#discussion_r4468520340


##########
hadoop-ozone/dev-support/checks/bats.sh:
##########
@@ -30,16 +30,18 @@ source "${DIR}/install/bats.sh"
 
 rm -f "${REPORT_DIR}/output.log"
 
-find * \( \
-    -path '*/src/test/shell/*' -name '*.bats' \
-    -or -path dev-support/ci/errorprone.bats \
-    -or -path dev-support/ci/selective_ci_checks.bats \
-    -or -path dev-support/ci/pr_title_check.bats \
-    -or -path dev-support/ci/find_test_class_project.bats \
-    -or -path dev-support/ci/junit_summary.bats \
-    \) -print0 \
-  | xargs -0 -n1 bats --formatter tap \
-  | tee -a "${REPORT_DIR}/output.log"
+# accept specific tests as argument
+if [[ "${CI:-}" != "true" ]] && [[ "$#" -ge 1 ]]; then
+  echo "$@" \
+    | xargs -n1 bats --formatter tap
+# or run all tests
+else
+  find * \
+      \( -path '*/src/test/shell/*.bats' -or -path 'dev-support/ci/*.bats' \) \
+      -not -path '*/bats-core/*' -not -path '*/bats-support/*' -not -path 
'*/bats-assert/*' \

Review Comment:
   `find *` doesn't descend into the hidden `.dev-tools` dir, the installed 
dirs are versioned (`bats-core-1.14.0`, `bats-support-0.3.0` etc.), and the 
include patterns already limit results to `*/src/test/shell/` and 
`dev-support/ci/`. Can we drop that line?
   



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