From 06c9a9d6efc12f8bec1a52f6a339331adbb2f732 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Fri, 19 Oct 2012 16:25:23 +0200
Subject: [PATCH] Add note about running individual test cases

This was asked a few times offline, so let's document it.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
---
 doc/devnotes.rst | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/doc/devnotes.rst b/doc/devnotes.rst
index 421af60f3..c5594e843 100644
--- a/doc/devnotes.rst
+++ b/doc/devnotes.rst
@@ -141,6 +141,29 @@ for example, in bash via ``.bashrc``::
 or in emacs via ``completion-ignored-extensions`` (run ``M-x
 customize-var completion-ignored-extensions``).
 
+Running individual tests
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+When developing code, running the entire test suite can be
+slow. Running individual tests is possible easily for unit-tests, less
+so for shell-tests (but these are faster, so it shouldn't be needed).
+
+For Python tests::
+
+  $ export PYTHONPATH=$PWD
+  $ python ./test/ganeti.%mytest%
+
+For Haskell tests::
+
+  $ make htest/test && ./htest/test -t %pattern%
+
+Where ``pattern`` can be a simple test pattern (e.g. ``comma``,
+matching any test whose name contains ``comma``), a test pattern
+denoting a group (ending with a slash, e.g. ``Utils/``), or more
+complex glob pattern. For more details, see the documentation (on the
+`test-framework homepage
+<http://batterseapower.github.com/test-framework/>`_).
+
 Packaging notes
 ===============
 
-- 
GitLab