Skip to content

Commit e1a5269

Browse files
committed
scripts: testbench profile: fallback to relative SOF environment if not set.
Use a fallback SOF_WORKSPACE relative to script dir if environment not set. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
1 parent 039fcb5 commit e1a5269

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

scripts/sof-testbench-build-profile.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ MODULES_S32="asrc dcblock drc drc_multiband eqfir eqiir gain src tdfb"
1515
MODULES_S24="aria"
1616

1717
if [ -z "${SOF_WORKSPACE}" ]; then
18-
echo "Error: environment variable SOF_WORKSPACE need to be set to top level sof directory"
19-
exit 1
18+
# fallback to the script directory default path
19+
SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
20+
SOF_REPO=$(dirname "$SCRIPT_DIR")
21+
SOF_WORKSPACE="$SOF_REPO/../"
22+
echo "Using default SOF environment at $SOF_WORKSPACE"
2023
fi
2124

2225
PLATFORM=none

0 commit comments

Comments
 (0)