diff options
author | Peter Johanson <[email protected]> | 2023-12-02 16:16:49 +0000 |
---|---|---|
committer | Pete Johanson <[email protected]> | 2023-12-02 17:11:45 -0800 |
commit | 55aed8e89d3d256b3e758be5bc5dfbb23ea04ece (patch) | |
tree | c533572be2ddc5df1ad594f50467592d4f466ba3 /app/run-test.sh | |
parent | c63d0791d52f2566bdca50895866339ce6fb947a (diff) | |
download | zmk-55aed8e89d3d256b3e758be5bc5dfbb23ea04ece.tar.gz zmk-55aed8e89d3d256b3e758be5bc5dfbb23ea04ece.zip |
feat(tests): Add ability to auto-accept test diff.
Diffstat (limited to 'app/run-test.sh')
-rwxr-xr-x | app/run-test.sh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/app/run-test.sh b/app/run-test.sh index 6935f2c8b3..cfd376686c 100755 --- a/app/run-test.sh +++ b/app/run-test.sh @@ -39,8 +39,15 @@ if [ $? -gt 0 ]; 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 + + + if [ -n "${ZMK_TESTS_AUTO_ACCEPT}" ]; then + echo "Auto-accepting failure for $testcase" + cp build/$testcase/keycode_events.log $testcase/keycode_events.snapshot + else + echo "FAILED: $testcase" | tee -a ./build/tests/pass-fail.log + exit 1 + fi fi echo "PASS: $testcase" | tee -a ./build/tests/pass-fail.log |