Browse Source

fix(tests): return error code when build fails

xmkb
Cody McGinnis 4 years ago
parent
commit
f6269df5fc
  1. 1
      app/run-test.sh

1
app/run-test.sh

@ -22,6 +22,7 @@ echo "Running $testcase:"
west build -d build/$testcase -b native_posix -- -DZMK_CONFIG=$testcase > /dev/null 2>&1 west build -d build/$testcase -b native_posix -- -DZMK_CONFIG=$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 "FAIL: $testcase did not build" >> ./build/tests/pass-fail.log
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

Loading…
Cancel
Save