test: print test output immediately and decrease indenting
This commit is contained in:
parent
d59797ba13
commit
f692d64d05
1 changed files with 13 additions and 14 deletions
|
@ -28,21 +28,20 @@ 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 "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
|
exit 1
|
||||||
else
|
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
|
./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 "PENDING: $testcase" >> ./build/tests/pass-fail.log
|
echo "PENDING: $testcase" | tee -a ./build/tests/pass-fail.log
|
||||||
exit 0
|
exit 0
|
||||||
else
|
fi
|
||||||
echo "FAILED: $testcase" >> ./build/tests/pass-fail.log
|
echo "FAILED: $testcase" | tee -a ./build/tests/pass-fail.log
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
echo "PASS: $testcase" >> ./build/tests/pass-fail.log
|
echo "PASS: $testcase" | tee -a ./build/tests/pass-fail.log
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
Loading…
Reference in a new issue