Skip to content

Commit 707ace1

Browse files
committed
Modified init_env to point to runner utils path and functestlib.sh is now made a symlink instead of full copy in the host-tools utils path
Signed-off-by: Nitin Nakka <nitinn@qti.qualcomm.com>
1 parent f17b11b commit 707ace1

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

host-tools/init_env

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -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"
3832
fi
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
4441
fi
4542

4643
export ROOT_DIR
47-
export TOOLS="$ROOT_DIR/utils"
44+
export TOOLS="$RUNNER_ROOT/utils"
4845
export __RUNNER_SUITES_DIR="$ROOT_DIR"
4946
export __RUNNER_UTILS_BIN_DIR="$ROOT_DIR/common"
5047

@@ -57,10 +54,13 @@ case ":$PATH:" in
5754
;;
5855
esac
5956

60-
# --- Source functestlib.sh to make functions available ---
57+
# --- Source functestlib.sh from Runner to make functions available ---
6158
if [ -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
6464
fi
6565

6666
###############################################################################

host-tools/utils/functestlib.sh

-148 KB
Binary file not shown.

0 commit comments

Comments
 (0)