From dcc61a4d47d4bb0131efe481dc2e3022d8c9c623 Mon Sep 17 00:00:00 2001 From: Jakub Jatczak Date: Fri, 30 Oct 2020 10:28:09 +0100 Subject: [PATCH] Bluepill Change output logs --- tensorflow/lite/micro/testing/bluepill.robot | 8 +++++++- tensorflow/lite/micro/testing/test_bluepill_binary.sh | 11 +++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/tensorflow/lite/micro/testing/bluepill.robot b/tensorflow/lite/micro/testing/bluepill.robot index 5a4c0b21b6e..56cf74746b2 100644 --- a/tensorflow/lite/micro/testing/bluepill.robot +++ b/tensorflow/lite/micro/testing/bluepill.robot @@ -2,10 +2,11 @@ Suite Setup Prepare Tests Suite Teardown Teardown Test Setup Reset Emulation -Test Teardown Test Teardown +Test Teardown Teardown With Custom Message Resource ${RENODEKEYWORDS} *** Variables *** +${CREATE_SNAPSHOT_ON_FAIL} False ${UART} sysbus.cpu.uartSemihosting *** Keywords *** @@ -19,6 +20,10 @@ Prepare Tests Set Suite Variable ${LOGFILE} List All Test Binaries +Teardown With Custom Message + Set Test Message ${file} - FAILED + Test Teardown + List All Test Binaries Setup ${BIN_DIR} = Get Environment Variable BIN_DIR @@ -42,6 +47,7 @@ Should Run All Bluepill Tests FOR ${BIN} IN @{binaries} Execute Command $bin = @${BIN} ${_} ${file} = Split Path ${BIN} + Set Test Variable ${file} Test Binary Execute Command Clear diff --git a/tensorflow/lite/micro/testing/test_bluepill_binary.sh b/tensorflow/lite/micro/testing/test_bluepill_binary.sh index 2ff03f53849..4a11b7a320f 100755 --- a/tensorflow/lite/micro/testing/test_bluepill_binary.sh +++ b/tensorflow/lite/micro/testing/test_bluepill_binary.sh @@ -54,18 +54,17 @@ if ! BIN_DIR=${ROOT_DIR}/$1 \ EXPECTED="$2" \ ${RENODE_TEST_SCRIPT} \ ${ROOT_DIR}/tensorflow/lite/micro/testing/bluepill.robot \ - -r $TEST_TMPDIR &> ${MICRO_LOG_PATH}robot_logs.txt + -r $TEST_TMPDIR then exit_code=1 fi -echo "LOGS:" -# Extract output from renode log -cat ${MICRO_LOG_FILENAME} |grep 'uartSemihosting' |sed 's/^.*from start] *//g' if [ $exit_code -eq 0 ] then - echo "$1: PASS" + echo "PASS" else - echo "$1: FAIL - '$2' not found in logs." + echo "UART LOGS:" + # Extract output from renode log + cat ${MICRO_LOG_FILENAME} |grep 'uartSemihosting' |sed 's/^.*from start] *//g' fi exit $exit_code