From 0c333467618e214f6a48391a3743ead8d3a6f405 Mon Sep 17 00:00:00 2001 From: Ben Foster Date: Thu, 26 Oct 2017 00:13:50 +0100 Subject: [PATCH] Added some debugging tips to Contributing --- CONTRIBUTING.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 623d4ba..835317f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,6 +27,23 @@ git checkout -b 325-kill-sql-injections Just type `make coverage` or `make debug`, the testsuite should be run automatically. Please do add tests if you're fixing a bug or adding a new feature. +#### Debugging failures in the test suite + +If your changes have introduced run-time failures in the test-suite, you can +easily attach your debugger to analyse that particular test case by doing the +following: +``` +make debug +cd src/ +make test TESTS="-v --show-diff" +``` +Adding the `-v` flag will provide more information (e.g. the full command used +to run that particular test case), and `--show-diff` will (if the test case +failed) show the difference between what was returned, and what was expected. + +If you'd like to see what other options are available for debugging test cases, +you can add `-h` to the `TESTS` variable. + ### 4. Did you find a bug? * **Ensure the bug was not already reported** by