diff options
| author | Ben Foster | 2017-10-26 00:13:50 +0100 |
|---|---|---|
| committer | jvoisin | 2017-10-26 10:20:51 +0200 |
| commit | 0c333467618e214f6a48391a3743ead8d3a6f405 (patch) | |
| tree | d5017ad484bdf0ed21bf2a6360c9e0debc514636 | |
| parent | 5c841311bd762afc9c0edd46e65e2a8dcf109e68 (diff) | |
Added some debugging tips to Contributing
| -rw-r--r-- | CONTRIBUTING.md | 17 |
1 files changed, 17 insertions, 0 deletions
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 | |||
| 27 | Just type `make coverage` or `make debug`, the testsuite should be run | 27 | Just type `make coverage` or `make debug`, the testsuite should be run |
| 28 | automatically. Please do add tests if you're fixing a bug or adding a new feature. | 28 | automatically. Please do add tests if you're fixing a bug or adding a new feature. |
| 29 | 29 | ||
| 30 | #### Debugging failures in the test suite | ||
| 31 | |||
| 32 | If your changes have introduced run-time failures in the test-suite, you can | ||
| 33 | easily attach your debugger to analyse that particular test case by doing the | ||
| 34 | following: | ||
| 35 | ``` | ||
| 36 | make debug | ||
| 37 | cd src/ | ||
| 38 | make test TESTS="-v --show-diff" | ||
| 39 | ``` | ||
| 40 | Adding the `-v` flag will provide more information (e.g. the full command used | ||
| 41 | to run that particular test case), and `--show-diff` will (if the test case | ||
| 42 | failed) show the difference between what was returned, and what was expected. | ||
| 43 | |||
| 44 | If you'd like to see what other options are available for debugging test cases, | ||
| 45 | you can add `-h` to the `TESTS` variable. | ||
| 46 | |||
| 30 | ### 4. Did you find a bug? | 47 | ### 4. Did you find a bug? |
| 31 | 48 | ||
| 32 | * **Ensure the bug was not already reported** by | 49 | * **Ensure the bug was not already reported** by |
