-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update stm32 project, validate json output
- Loading branch information
Showing
9 changed files
with
244 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,46 @@ | ||
#!/bin/sh | ||
set -e | ||
set -x | ||
#!/bin/bash | ||
|
||
/home/probe-rs-runner/probe-rs run "$TARGET" $TARGET_CONFIG | ||
touch stdout | ||
touch stderr | ||
|
||
exit 1 | ||
/home/probe-rs-runner/probe-rs run --disable-progressbars "$TARGET" $TARGET_CONFIG --format=json 2> stderr | jq -c 'del(.exec_time)' >stdout | ||
|
||
# only fetch log rtt logs from stderr, ignore backtraces for now, remove function addresses | ||
cat stderr | sed -nE 's/^[0-9]{1,2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}: (TRACE|DEBUG|INFO|WARN|ERROR)/\1/p' | sed 's/ function: 0x[0-9a-fA-F]\{1,\},//g'> rtt_logs | ||
|
||
echo "------------------------------------------------" >&2 | ||
echo "Stdout" >&2 | ||
echo "------------------------------------------------" >&2 | ||
cat stdout >&2 | ||
echo "------------------------------------------------" >&2 | ||
echo "Stderr" >&2 | ||
echo "------------------------------------------------" >&2 | ||
cat stderr >&2 | ||
echo "------------------------------------------------" >&2 | ||
echo "Rtt logs" >&2 | ||
echo "------------------------------------------------" >&2 | ||
cat rtt_logs >&2 | ||
echo "------------------------------------------------" >&2 | ||
|
||
res=0 | ||
|
||
# Output markers around diff to render it nicely in markdown | ||
echo "Test Results diff:" | ||
echo "\`\`\`diff" | ||
if ! diff expected_test_results.txt stdout; then | ||
res=1 | ||
fi | ||
|
||
|
||
echo "\`\`\`" | ||
|
||
echo "Rtt logs diff:" | ||
echo "\`\`\`diff" | ||
if ! diff expected_rtt_logs.txt rtt_logs; then | ||
res=1 | ||
fi | ||
echo "\`\`\`" | ||
|
||
rm -f stdout stderr rtt_logs | ||
|
||
exit $res |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.