Browse Source

test: Change length of fail and pend messages

This makes scanning the output from "west test" easier, as the different states get different output lengths.
xmkb
okke 3 years ago committed by Pete Johanson
parent
commit
d59797ba13
  1. 6
      app/run-test.sh

6
app/run-test.sh

@ -28,17 +28,17 @@ echo "Running $testcase:"
west build -d build/$testcase -b native_posix -- -DZMK_CONFIG="$(pwd)/$testcase" > /dev/null 2>&1 west build -d build/$testcase -b native_posix -- -DZMK_CONFIG="$(pwd)/$testcase" > /dev/null 2>&1
if [ $? -gt 0 ]; then if [ $? -gt 0 ]; then
echo "FAIL: $testcase did not build" >> ./build/tests/pass-fail.log echo "FAILED: $testcase did not build" >> ./build/tests/pass-fail.log
exit 1 exit 1
else else
./build/$testcase/zephyr/zmk.exe | sed -e "s/.*> //" | tee build/$testcase/keycode_events_full.log | sed -n -f $testcase/events.patterns > build/$testcase/keycode_events.log ./build/$testcase/zephyr/zmk.exe | sed -e "s/.*> //" | tee build/$testcase/keycode_events_full.log | sed -n -f $testcase/events.patterns > build/$testcase/keycode_events.log
diff -au $testcase/keycode_events.snapshot build/$testcase/keycode_events.log diff -au $testcase/keycode_events.snapshot build/$testcase/keycode_events.log
if [ $? -gt 0 ]; then if [ $? -gt 0 ]; then
if [ -f $testcase/pending ]; then if [ -f $testcase/pending ]; then
echo "PEND: $testcase" >> ./build/tests/pass-fail.log echo "PENDING: $testcase" >> ./build/tests/pass-fail.log
exit 0 exit 0
else else
echo "FAIL: $testcase" >> ./build/tests/pass-fail.log echo "FAILED: $testcase" >> ./build/tests/pass-fail.log
exit 1 exit 1
fi fi
else else

Loading…
Cancel
Save