tests/bsim: Fix not detecting failures

b0339136c1
Broke the check for failed bsim tests.
Let's fix it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
Alberto Escolar Piedras 2024-04-15 14:27:41 +02:00 committed by Alberto Escolar
parent 4959a0241e
commit becf4c1c81
1 changed files with 2 additions and 2 deletions

View File

@ -78,10 +78,10 @@ if [ `command -v parallel` ]; then
parallel '
echo "<testcase name=\"{}\" time=\"0\">"
start=$(date +%s%N)
{} $@ &> {#}.log
{} $@ &> {#}.log ; result=$?
dur=$(($(date +%s%N) - $start))
dur_s=$(awk -vdur=$dur "BEGIN { printf(\"%0.3f\", dur/1000000000)}")
if [ $? -ne 0 ]; then
if [ $result -ne 0 ]; then
(>&2 echo -e "\e[91m{} FAILED\e[39m ($dur_s s)")
(>&2 cat {#}.log)
echo "<failure message=\"failed\" type=\"failure\">"