From 8761577b28b678b3aa0469318a0079a06dfb2b3f Mon Sep 17 00:00:00 2001 From: ddavis-2015 Date: Mon, 21 Jul 2025 18:51:15 -0700 Subject: [PATCH] Don't allow silent failures for Xtensa binaries @tensorflow/micro Do not allow programs, which are not unit tests, to silently fail when run using the Xtensa simulator. The generic benchmark application is one such program for which failures were not being reported. Check the exit status of the simulator when running programs that are not unit tests. bug=fixes #3155 --- tensorflow/lite/micro/testing/test_xtensa_binary.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tensorflow/lite/micro/testing/test_xtensa_binary.sh b/tensorflow/lite/micro/testing/test_xtensa_binary.sh index 9141d2f6d8f..5248f031dc7 100755 --- a/tensorflow/lite/micro/testing/test_xtensa_binary.sh +++ b/tensorflow/lite/micro/testing/test_xtensa_binary.sh @@ -1,5 +1,5 @@ #!/bin/bash -e -# Copyright 2019 The TensorFlow Authors. All Rights Reserved. +# Copyright 2025 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -26,7 +26,8 @@ declare -r MICRO_LOG_PATH=${TEST_TMPDIR}/$1 declare -r MICRO_LOG_FILENAME=${MICRO_LOG_PATH}/logs.txt mkdir -p ${MICRO_LOG_PATH} -xt-run $1 2>&1 | tee ${MICRO_LOG_FILENAME} +xt-run --exit_with_target_code $1 2>&1 | tee ${MICRO_LOG_FILENAME} +STATUS=${PIPESTATUS[0]} if [[ ${2} != "non_test_binary" ]] then @@ -36,5 +37,6 @@ then else exit 1 fi +else + exit ${STATUS} fi -