Bluepill Change output logs

This commit is contained in:
Jakub Jatczak 2020-10-30 10:28:09 +01:00
parent 94b4bc2693
commit dcc61a4d47
2 changed files with 12 additions and 7 deletions

View File

@ -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

View File

@ -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