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