Skip to content

Commit

Permalink
Now we have hyperram support we can run the test suite on sonata.
Browse files Browse the repository at this point in the history
Also tweak the run-sonata script to check for failures and increase timeout.
  • Loading branch information
rmn30 committed Jan 21, 2025
1 parent 5bb8a0a commit 4b50c8f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ jobs:
xmake f --board=${{ matrix.board }} --sdk=/cheriot-tools/ ${{ matrix.build-flags }}
xmake
- name: Run tests
# Test suite needs HyperRAM support to be added to RTOS because SRAM is not big enough.
if: ${{ !matrix.sonata }}
run: |
cd tests
xmake run
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
All tests finished
10 changes: 8 additions & 2 deletions scripts/run-sonata-sim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,26 @@ if [ -n "$2" ] ; then
# Run the simulator in the background.
${SONATA_SIMULATOR} -E "${SONATA_SIMULATOR_BOOT_STUB}" -E "$1" &
LOOP_TRACKER=0
while (( LOOP_TRACKER <= 60 ))
while (( LOOP_TRACKER <= 1200 ))
do
sleep 1s
# Returns 0 if found and 1 if not.
MATCH_FOUND=$(grep -q -F -f "$2" "${SONATA_SIMULATOR_UART_LOG}"; echo $?)
if (( MATCH_FOUND == 0 )) ; then
# Match was found so exit with success
# Match was found so kill the simulator
pkill -P $$
# Check to see if the output indicates failure
if grep -i failure "${SONATA_SIMULATOR_UART_LOG}"; then
exit 5
fi
exit 0
fi
LOOP_TRACKER=$((LOOP_TRACKER+1))
done
# Timeout was hit so no success.
pkill -P $$
echo "UART output:"
cat "${SONATA_SIMULATOR_UART_LOG}"
exit 4
else
# If there is no second argument, run simulator in foreground.
Expand Down

0 comments on commit 4b50c8f

Please sign in to comment.