summaryrefslogtreecommitdiff
path: root/docs/unit_testing.md
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2021-07-25 16:18:46 +0000
committerQMK Bot <hello@qmk.fm>2021-07-25 16:18:46 +0000
commitd90897052243808863bcab3b07e16d5b6a0b08f0 (patch)
treefafe06bc2c7302c836fc35954eacaa1f2225344d /docs/unit_testing.md
parent71e9f8fc11f617278497611e169bf2ddccd2211c (diff)
parentfc9fb2c77505cf1dcf5d1f50dd61a980471b3494 (diff)
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'docs/unit_testing.md')
-rw-r--r--docs/unit_testing.md10
1 files changed, 9 insertions, 1 deletions
diff --git a/docs/unit_testing.md b/docs/unit_testing.md
index 82073a2016..a0eef51cb6 100644
--- a/docs/unit_testing.md
+++ b/docs/unit_testing.md
@@ -36,12 +36,20 @@ Note how there's several different tests, each mocking out a separate part. Also
## Running the Tests
-To run all the tests in the codebase, type `make test`. You can also run test matching a substring by typing `make test:matchingsubstring` Note that the tests are always compiled with the native compiler of your platform, so they are also run like any other program on your computer.
+To run all the tests in the codebase, type `make test:all`. You can also run test matching a substring by typing `make test:matchingsubstring` Note that the tests are always compiled with the native compiler of your platform, so they are also run like any other program on your computer.
## Debugging the Tests
If there are problems with the tests, you can find the executable in the `./build/test` folder. You should be able to run those with GDB or a similar debugger.
+To forward any [debug messages](unit_testing.md#debug-api) to `stderr`, the tests can run with `DEBUG=1`. For example
+
+```console
+make test:all DEBUG=1
+```
+
+Alternatively, add `CONSOLE_ENABLE=yes` to the tests `rules.mk`.
+
## Full Integration Tests
It's not yet possible to do a full integration test, where you would compile the whole firmware and define a keymap that you are going to test. However there are plans for doing that, because writing tests that way would probably be easier, at least for people that are not used to unit testing.