From 2befb2c1e11810948783dfed01c6adb8462fb10e Mon Sep 17 00:00:00 2001
From: Cole Helbling <cole.e.helbling@outlook.com>
Date: Fri, 5 Mar 2021 00:01:49 -0800
Subject: [PATCH] doc: document how to run tests

Both `make check` and `make && yath test` are now documented ways to
run the test suite.
---
 doc/manual/src/hacking.md | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/doc/manual/src/hacking.md b/doc/manual/src/hacking.md
index 6bf447f4..a7904959 100644
--- a/doc/manual/src/hacking.md
+++ b/doc/manual/src/hacking.md
@@ -26,3 +26,21 @@ To build Hydra, you should then do:
 You can run the Hydra web server in your source tree as follows:
 
     $ ./src/script/hydra-server
+
+You can run Hydra's test suite with the following:
+
+    [nix-shell]$ make check
+    [nix-shell]$ # to run as many tests as you have cores:
+    [nix-shell]$ make check YATH_JOB_COUNT=$NIX_BUILD_CORES
+    [nix-shell]$ # or run yath directly:
+    [nix-shell]$ yath test
+    [nix-shell]$ # to run as many tests as you have cores:
+    [nix-shell]$ yath test -j $NIX_BUILD_CORES
+
+When using `yath` instead of `make check`, ensure you have run `make`
+in the root of the repository at least once.
+
+**Warning**: Currently, the tests can fail
+if run with high parallelism [due to an issue in
+`Test::PostgreSQL`](https://github.com/TJC/Test-postgresql/issues/40)
+causing database ports to collide.