A user will invoke the svntest framework by
running % make check
in the toplevel
build directory. The test framework will run all of
the test cases and report results on the command line
when invoked in this fashion.
Developers often need a fine grained interface, this
is provided with the svntest script. One would add
the directory where the svntest script is located
to the PATH and invoke % svntest
to
This usage is equivalent to running % make check
.
Either of these options will print the svntest usage text.
% svntest help
% svntest --help
This option will recurse through subdirectories and remove
any generated files it finds.
% svntest clean
This option will prepare generated log files for checkin
to the version control system. This command will move
generated log files from the
% svntest commit-prep
logging/
directory in the build directory to the logging/
directory in the src directory. Typically, only the maintainers
will make use of this subcommand.
This option provides a handy way to debug a crashing
test case. A developer would pass the name of a crashing
test case as the pattern argument. The svntest
would then attempt to run the test case with a debugger
like
% svntest debug pattern
gdb
. The goal is to make this work
seamlessly for both in process and other process tests.
This subcommand is currently unimplemented.
When a single pattern argument is passed to
the svntest argument, it denotes the set of test names
to be run. A test session will be started, but only
those tests that match the pattern argument
will actually be invoked. Here is a quick example:
% svntest pattern
% svntest "client-help-*"
The above invocation would run only the tests that check the svn help usage text. The final usage is to simply invoke the svntest script with no arguments. Doing so will recurse into subdirectories and run tests as if the user has passed * as the pattern argument.
One should also note that the svntest script depends on
the current directory. That means you can cd to a
directory and run the svntest script to process
only those tests in the given directory. Tests cases
are always stored in a file called tests.tcl
.
Also note that test files themselves are always run out
of the srcdir and not the build directory, while generated
files and core dumps will appear in the build directory only.