volser: set error, not code, before rfail
[openafs.git] / tests / README
1 This directory contains a test harness and the beginnings of what is
2 intended to become the primary OpenAFS test suite.  The tests in this
3 directory are run when "make check" is run at the top level of the OpenAFS
4 tree.
5
6 runtests is the test harness, and TESTS is the list of tests that it
7 will run.  If you add a new test, add it to TESTS as well.  All tests must
8 be executables (possibly shell scripts or Perl scripts) that end in either
9 ".t" or "-t", but should be listed in TESTS without that suffix.
10
11 Tests should be organized into subdirectories, and where it makes sense to
12 do so, those subdirectories should match the subdirectory names under src
13 in the AFS source tree.  In other words, tests for src/util/* should go in
14 a directory named util, tests for the libkopenafs library should go in a
15 directory named kopenafs, and so forth.  To integrate with the build
16 system, each subdirectory will need to have its own Makefile.in and be
17 added to the list of generated Makefiles in configure.in at the top
18 level.   The Makefile.in in this directory will also need to be modified
19 to recurse into any new directories.  See util/Makefile.in for an example
20 of how to write a Makefile.in for a new test directory.
21
22 The files comprising the test harness are sourced from the C TAP Harness
23 distribution using the src/external mechanism. The upstream site for that
24 distribution is at:
25
26     http://www.eyrie.org/~eagle/software/c-tap-harness/
27
28 but feel free to propose modifications directly through OpenAFS Gerrit.
29 Russ Allbery will take care of merging modifications upstream.  However,
30 OpenAFS-specific modifications should not be made to those files.  To add
31 additional OpenAFS-specific code to the TAP library, add additional *.c
32 and *.h (or *.sh) files to the tests/tap directory rather than modifying files
33 in src/external.
34
35 More information can be found in the HOWTO contained in
36 src/external/c-tap-harness/HOWTO
37