@@ -28,23 +28,20 @@ if [ -z "$ROOT_DIR" ]; then
2828 fi
2929
3030 # For host-tools, ROOT_DIR is the host-tools directory itself
31- if [ -d " $_script_dir /utils" ] && [ -f " $_script_dir /utils/functestlib.sh" ]; then
32- ROOT_DIR=" $_script_dir "
33- else
34- echo " [ERROR] Could not detect host-tools root (missing utils/ or functestlib.sh)" >&2
35- echo " [DEBUG] Tried _script_dir=$_script_dir " >&2
36- exit 1
37- fi
31+ ROOT_DIR=" $_script_dir "
3832fi
3933
4034# --- Validate and export key environment paths ---
41- if [ -z " ${ROOT_DIR:- } " ] || [ ! -d " $ROOT_DIR /utils" ] || [ ! -f " $ROOT_DIR /utils/functestlib.sh" ]; then
42- echo " [ERROR] Could not detect host-tools root (missing utils/ or functestlib.sh)" >&2
35+ # Point to Runner/utils for shared utilities
36+ RUNNER_ROOT=" $ROOT_DIR /../Runner"
37+ if [ ! -d " $RUNNER_ROOT /utils" ] || [ ! -f " $RUNNER_ROOT /utils/functestlib.sh" ]; then
38+ echo " [ERROR] Could not find Runner/utils/functestlib.sh" >&2
39+ echo " [ERROR] Expected at: $RUNNER_ROOT /utils/functestlib.sh" >&2
4340 exit 1
4441fi
4542
4643export ROOT_DIR
47- export TOOLS=" $ROOT_DIR /utils"
44+ export TOOLS=" $RUNNER_ROOT /utils"
4845export __RUNNER_SUITES_DIR=" $ROOT_DIR "
4946export __RUNNER_UTILS_BIN_DIR=" $ROOT_DIR /common"
5047
@@ -57,10 +54,13 @@ case ":$PATH:" in
5754 ;;
5855esac
5956
60- # --- Source functestlib.sh to make functions available ---
57+ # --- Source functestlib.sh from Runner to make functions available ---
6158if [ -f " $TOOLS /functestlib.sh" ]; then
6259 # shellcheck disable=SC1090,SC1091
6360 . " $TOOLS /functestlib.sh"
61+ else
62+ echo " [ERROR] Could not source functestlib.sh from $TOOLS " >&2
63+ exit 1
6464fi
6565
6666# ##############################################################################
0 commit comments