File tree Expand file tree Collapse file tree 3 files changed +516
-163
lines changed Expand file tree Collapse file tree 3 files changed +516
-163
lines changed Original file line number Diff line number Diff line change @@ -29,12 +29,25 @@ if [ -z "$ROOT_DIR" ]; then
2929 fi
3030fi
3131
32- if [ ! -d " $ROOT_DIR /utils" ] || [ ! -f " $ROOT_DIR /utils/functestlib.sh" ]; then
33- echo " [ERROR] Could not detect testkit root (missing utils/ or functestlib.sh)" >&2
32+ # --- Validate and export key environment paths ---
33+ if [ -z " ${ROOT_DIR:- } " ] || [ ! -d " $ROOT_DIR /utils" ] || [ ! -f " $ROOT_DIR /utils/functestlib.sh" ]; then
34+ echo " [ERROR] Could not detect testkit root (missing utils/ or functestlib.sh)" >&2
3435 exit 1
3536fi
3637
3738export ROOT_DIR
3839export TOOLS=" $ROOT_DIR /utils"
3940export __RUNNER_SUITES_DIR=" $ROOT_DIR /suites"
4041export __RUNNER_UTILS_BIN_DIR=" $ROOT_DIR /common"
42+
43+ # --- Ensure TOOLS is usable in all shells ---
44+ case " :$PATH :" in
45+ * " :$TOOLS :" * ) : ;;
46+ * ) PATH=" $TOOLS :$PATH " ; export PATH ;;
47+ esac
48+
49+ # --- Optional: pre-check for required tools (safe no-op for minimal builds) ---
50+ if [ -f " $TOOLS /functestlib.sh" ]; then
51+ # shellcheck disable=SC1090,SC1091
52+ . " $TOOLS /functestlib.sh" > /dev/null 2>&1 || true
53+ fi
You can’t perform that action at this time.
0 commit comments