summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorokke <okke@formsma.nl>2021-12-11 20:55:56 +0100
committerPete Johanson <peter@peterjohanson.com>2022-01-04 23:59:25 -0500
commitf692d64d0557f898ec08e26ec75320383d937337 (patch)
tree2ab5fe4c146bea036b947cb180f78a377ffc97c8 /app
parentd59797ba13f623b6654e81cd9ee65ffca272d2d9 (diff)
test: print test output immediately and decrease indenting
Diffstat (limited to 'app')
-rwxr-xr-xapp/run-test.sh27
1 files changed, 13 insertions, 14 deletions
diff --git a/app/run-test.sh b/app/run-test.sh
index cbc6fbb..da4803d 100755
--- a/app/run-test.sh
+++ b/app/run-test.sh
@@ -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
- 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
+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" | 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