summaryrefslogtreecommitdiffstats
path: root/src/guestfs.pod
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-11-12 17:54:31 +0000
committerRichard W.M. Jones <rjones@redhat.com>2012-11-13 15:26:29 +0000
commit3636c5fcff69e7a5a5afa126a597883db4c781bb (patch)
tree0d1406c121f1fb684b54f0d33b564246774bb826 /src/guestfs.pod
parentc4a3ea066be9823d4572b57fd05940345904b826 (diff)
downloadlibguestfs-3636c5fcff69e7a5a5afa126a597883db4c781bb.tar.gz
libguestfs-3636c5fcff69e7a5a5afa126a597883db4c781bb.tar.xz
libguestfs-3636c5fcff69e7a5a5afa126a597883db4c781bb.zip
tests: Replace 'make extra-tests' with individual tests.
'make extra-tests' was a monolithic set of tests that did all sorts of things: valgrind, tests over local guests, tests with upstream qemu, tests with upstream libvirt, tests with the appliance attach method. This made it hard to perform individual tests, eg. just valgrind testing. It was also hard to maintain because the tests were not located in the same directories as the programs and sometimes duplicated tests that were run elsewhere. This commit splits up 'make extra-tests' into 5 separate targets: make check-valgrind # run a subset of tests under valgrind make check-valgrind-local-guests # test under valgrind with local guests make check-with-appliance # test with attach-method == appliance make check-with-upstream-qemu # test with an alternate/upstream qemu make check-with-upstream-libvirt # test with an alternate/upstream libvirt (You can also still run 'make extra-tests' which is now simply a rule that runs the above 5 targets in order). This replaces everything that was in the tests/extra directory, so that has now gone.
Diffstat (limited to 'src/guestfs.pod')
-rw-r--r--src/guestfs.pod61
1 files changed, 53 insertions, 8 deletions
diff --git a/src/guestfs.pod b/src/guestfs.pod
index e0246619..f4223d2a 100644
--- a/src/guestfs.pod
+++ b/src/guestfs.pod
@@ -3462,7 +3462,7 @@ Debugging the daemon is a problem because it runs inside a minimal
environment. However you can fprintf messages in the daemon to
stderr, and they will show up if you use C<guestfish -v>.
-=head2 FORMATTING CODE AND OTHER CONVENTIONS
+=head2 FORMATTING CODE
Our C source code generally adheres to some basic code-formatting
conventions. The existing code base is not totally consistent on this
@@ -3495,6 +3495,8 @@ If you use Emacs, add the following to one of one of your start-up files
(buffer-file-name))
(libguestfs-c-mode))))
+=head2 TESTING YOUR CHANGES
+
Enable warnings when compiling (and fix any problems this
finds):
@@ -3502,13 +3504,56 @@ finds):
Useful targets are:
- make syntax-check -j1 -k # checks for various syntax and
- # style problems
-
- make check # runs the test suite
-
- make extra-tests # in-depth testing using valgrind
- # and real guests
+=over 4
+
+=item C<make check>
+
+Runs the regular test suite.
+
+=item C<make syntax-check -j1 -k>
+
+Checks for various syntax and style problems in the code.
+
+=item C<make check-valgrind>
+
+Runs a subset of the test suite under valgrind.
+
+=item C<make check-valgrind-local-guests>
+
+Runs a subset of the test suite under valgrind
+using locally installed libvirt guests (read-only).
+
+=item C<make check-with-appliance>
+
+Runs all tests using default appliance back-end. This only
+has any effect if a non-default attach-method was selected
+using C<./configure --with-default-attach-method=...>
+
+=item C<make check-with-upstream-qemu>
+
+Runs all tests using a local qemu binary. It looks for the qemu
+binary in QEMUDIR (defaults to C<$HOME/d/qemu>), but you can set this
+to another directory on the command line, eg:
+
+ make check-with-upstream-qemu QEMUDIR=/usr/src/qemu
+
+=item C<make check-with-upstream-libvirt>
+
+Runs all tests using a local libvirt. This only has any effect if the
+libvirt attach-method was selected using
+C<./configure --with-default-attach-method=libvirt>
+
+It looks for libvirt in LIBVIRTDIR (defaults to C<$HOME/d/libvirt>),
+but you can set this to another directory on the command line, eg:
+
+ make check-with-upstream-libvirt LIBVIRTDIR=/usr/src/libvirt
+
+=item C<make extra-tests>
+
+Equivalent to running all C<make check-*> rules
+(but not C<make check>).
+
+=back
=head2 DAEMON CUSTOM PRINTF FORMATTERS