From a7c1c52420cbec5b05a18f04209064dceab8036f Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Sat, 24 Jul 2021 19:51:42 +0000 Subject: [PATCH] scripts/run-mocks.sh: major refactor Adds --error-exitcode=1 to valgrind options (otherwise what's the point of using valgrind?) Skip alloc test that does not pass on HOST (passes with xt-run) Add help message. Runnable from anywhere. Use shell functions https://github.com/thesofproject/sof-test/issues/740 Fix all quoting issues and other shellcheck warnings. Add comments. Signed-off-by: Marc Herbert --- scripts/run-mocks.sh | 97 ++++++++++++++++++++++++++++++++------------ 1 file changed, 70 insertions(+), 27 deletions(-) diff --git a/scripts/run-mocks.sh b/scripts/run-mocks.sh index be10de7aed1e..61cb9a7d32f3 100755 --- a/scripts/run-mocks.sh +++ b/scripts/run-mocks.sh @@ -2,40 +2,83 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2021 Intel Corporation. All rights reserved. -# fail on any errors + +# Stop on most errors set -e -# default config of none supplied -CONFIG="tgph_defconfig" -VALGRIND_CMD="" +SOFTOP=$(cd "$(dirname "$0")"/.. && pwd) + +usage() +{ + cat <