= Running Qpid C++ tests =

General philosophy is that "make check" run all tests by default, but
developers can run tests selectively as explained below.

== Valgrind ==

By default we run tests under valgrind to detect memory errors if valgrind
is present. ./configure --disable-valgrind will disable it.

Default valgrind options are specified in .valgrindrc-default, which a
checked-in file. The actual options used are in .valgrindrc which is a
local file. Normally it is a copy of valgrindrc-default but you can
modify at will.

Supressed errors are listed in .valgrind.supp. If you want to change
suppressions for local testing, just modify .valgrindrc to point to a
different file. Do NOT add suppressions to .valgrindrc.supp unless
they are known problems outside of Qpid that can't reasonably be
worked around in Qpid.


== Unit Tests ==

Unit tests shared libraries containing CppUnit test plug-ins, run by
the CppUnit DllPlugInTester program.

run-unit-tests runs tests under valgrind, you can run it directly.
Library names (without path or .so) and CppUnit test paths can be
specified on the command line or in env var UNIT_TESTS. For example:

Selected test classes:
./run-unit-tests ValueTest ClientChannelTest

Individual test method
./run-unit-tests ValueTest :ValueTest::testStringValueEquals

You can also Build and run selected tests via make:
make check TESTS=run-unit-tests UNIT_TESTS=ClientChannelTest

NOTE: If you use DllPlugInTester directly note that if foobar.so is in
the current directory then this will fail with "can't load plugin":
 # DllPluginTester foobar.so

Instead you need to say:
 # DllPluginTester ./foobar.so

DllPluginTester uses dlopen() which only searches for shlibs
in the standard places unless the filename contains a "/".  In that
case it just tries to open the filename.

== System Tests ==

System tests are self contained AMQP client executables or scripts.
They are listed in the TESTS make variable, which can be over-ridden.

The ./start_broker "test" launches the broker, ./stop_broker" stops it.
Tests in between assume the broker is running.

./python_tests: runs ../python/run_tests. This is the main set of
system testss for the broker.

Other C++ client test executables and scripts under client/test are
system tests for the client.

By setting TESTS in a make command you can run a different subset of tests
against an already-running broker.




