Skip to content

Commit

Permalink
rebuild-testbench.sh: add incremental build command in help message
Browse files Browse the repository at this point in the history
Add interactive menuconfig and incremental build commands in help
message of rebuild-testbench.sh

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
  • Loading branch information
marc-hb committed Dec 12, 2023
1 parent 62a908e commit ff806b4
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions scripts/rebuild-testbench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ SOF_REPO=$(dirname "$SCRIPT_DIR")
TESTBENCH_DIR="$SOF_REPO"/tools/testbench

# Defaults
BUILD_BACKEND='make'
BUILD_TYPE=native
BUILD_DIR_NAME=build_testbench
BUILD_TARGET=install
Expand All @@ -23,7 +24,7 @@ usage: $0 [-f] [-p <platform>]
When omitted, perform a BUILD_TYPE=native, compile-only check.
-f Build testbench with compiler provided by fuzzer
(default path: $HOME/sof/work/AFL/afl-gcc)
-j number of parallel make/ninja jobs. Defaults to /usr/bin/nproc.
-j number of parallel $BUILD_BACKEND jobs. Defaults to /usr/bin/nproc.
You MUST re-run with -j1 when something is failing!
EOFUSAGE
}
Expand Down Expand Up @@ -100,11 +101,32 @@ EOFSETUP

testbench_usage()
{
local src_env_msg
if [ "$BUILD_TYPE" = 'xt' ]; then
export_xtensa_setup
src_env_msg="source $export_script"
fi

cat <<EOF0
Success!
For temporary, interactive Kconfiguration use:
$BUILD_BACKEND -C $TESTBENCH_DIR/$BUILD_DIR_NAME/sof_ep/build/ menuconfig
Permanent configuration is "src/arch/host/configs/library_defconfig".
For instant, incremental build:
$src_env_msg
$BUILD_BACKEND -C $TESTBENCH_DIR/$BUILD_DIR_NAME/ -j$(nproc)
EOF0

case "$BUILD_TYPE" in
xt)
export_xtensa_setup
cat <<EOFUSAGE
Success! Testbench binary for $BUILD_PLATFORM is in $xtbench
Testbench binary for $BUILD_PLATFORM is in $xtbench
it can be run with command:
$xtbench_run -h
Expand Down

0 comments on commit ff806b4

Please sign in to comment.