File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -176,9 +176,25 @@ check_dependencies() {
176176# --- Test case directory lookup ---
177177find_test_case_by_name () {
178178 test_name=$1
179- base_dir=" ${__RUNNER_SUITES_DIR:- $ROOT_DIR / suites} "
180- # Only search under the SUITES directory!
181- testpath=$( find " $base_dir " -type d -iname " $test_name " -print -quit 2> /dev/null)
179+ # Use __RUNNER_SUITES_DIR if set, otherwise default to $ROOT_DIR/suites
180+ # This allows both host-tools (where __RUNNER_SUITES_DIR=$ROOT_DIR)
181+ # and Runner (where it defaults to $ROOT_DIR/suites) to work correctly
182+ if [ -n " ${__RUNNER_SUITES_DIR:- } " ]; then
183+ base_dir=" $__RUNNER_SUITES_DIR "
184+ else
185+ base_dir=" ${ROOT_DIR:- $(pwd)} /suites"
186+ fi
187+
188+ # Use explicit path to Unix find command to avoid conflicts with other find utilities
189+ find_cmd=" find"
190+ if [ -x " /usr/bin/find" ]; then
191+ find_cmd=" /usr/bin/find"
192+ elif [ -x " /bin/find" ]; then
193+ find_cmd=" /bin/find"
194+ fi
195+
196+ # Search under the base directory
197+ testpath=$( " $find_cmd " " $base_dir " -type d -iname " $test_name " -print -quit 2> /dev/null)
182198 echo " $testpath "
183199}
184200
You can’t perform that action at this time.
0 commit comments