mirror of https://github.com/thesofproject/sof.git
Tools: Test: Audio: Delete only regular files in test begin
This patch adds test for to-be-deleted trace output file or simulation output PCM data file. Doing delete only for regular files allows to use e.g. /dev/null to redirect trace to be not shown when not needed. Or run test in debugger without need for output file. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This commit is contained in:
parent
15bf883ead
commit
0b4a796f72
|
@ -99,10 +99,17 @@ parse_args ()
|
|||
fi
|
||||
}
|
||||
|
||||
delete_file_check ()
|
||||
{
|
||||
if [ -f "$1" ]; then
|
||||
rm -f "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
run_testbench ()
|
||||
{
|
||||
rm -f "$FN_OUT"
|
||||
rm -f "$FN_TRACE"
|
||||
delete_file_check "$FN_OUT"
|
||||
delete_file_check "$FN_TRACE"
|
||||
if [ -z "$FN_TRACE" ]; then
|
||||
# shellcheck disable=SC2086
|
||||
$VALGRIND_CMD $CMD
|
||||
|
|
Loading…
Reference in New Issue