Browse Source

test: print test output immediately and decrease indenting

xmkb
okke 3 years ago committed by Pete Johanson
parent
commit
f692d64d05
  1. 25
      app/run-test.sh

25
app/run-test.sh

@ -28,21 +28,20 @@ echo "Running $testcase:" @@ -28,21 +28,20 @@ echo "Running $testcase:"
west build -d build/$testcase -b native_posix -- -DZMK_CONFIG="$(pwd)/$testcase" > /dev/null 2>&1
if [ $? -gt 0 ]; then
echo "FAILED: $testcase did not build" >> ./build/tests/pass-fail.log
echo "FAILED: $testcase did not build" | tee -a ./build/tests/pass-fail.log
exit 1
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
diff -au $testcase/keycode_events.snapshot build/$testcase/keycode_events.log
if [ $? -gt 0 ]; then
fi
./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
if [ $? -gt 0 ]; then
if [ -f $testcase/pending ]; then
echo "PENDING: $testcase" >> ./build/tests/pass-fail.log
exit 0
else
echo "FAILED: $testcase" >> ./build/tests/pass-fail.log
exit 1
fi
else
echo "PASS: $testcase" >> ./build/tests/pass-fail.log
echo "PENDING: $testcase" | tee -a ./build/tests/pass-fail.log
exit 0
fi
echo "FAILED: $testcase" | tee -a ./build/tests/pass-fail.log
exit 1
fi
echo "PASS: $testcase" | tee -a ./build/tests/pass-fail.log
exit 0

Loading…
Cancel
Save