App-DocKnot
view release on metacpan or search on metacpan
t/data/generate/c-tap-harness/output/readme view on Meta::CPAN
check_PROGRAMS = tests/runtests
tests_runtests_CPPFLAGS = -DC_TAP_SOURCE='"$(abs_top_srcdir)/tests"' \
-DC_TAP_BUILD='"$(abs_top_builddir)/tests"'
check_LIBRARIES = tests/tap/libtap.a
tests_tap_libtap_a_CPPFLAGS = -I$(abs_top_srcdir)/tests
tests_tap_libtap_a_SOURCES = tests/tap/basic.c tests/tap/basic.h \
tests/tap/float.c tests/tap/float.h tests/tap/macros.h
Omit float.c and float.h from the last line if your package doesn't
need the is_double function. Building the build and source
directories into runtests will let tests/runtests -o <test> work for
users without requiring that they set any other variables, even if
they're doing an out-of-source build.
Add additional source files and headers that should go into the TAP
library if you added extra utility functions for your package.
* Add code to Makefile.am to run the test suite:
check-local: $(check_PROGRAMS)
cd tests && ./runtests -l $(abs_top_srcdir)/tests/TESTS
See the Makefile.am in this package for an example.
* List the test programs in the tests/TESTS file. This should have the
name of the test executable with the trailing "-t" or ".t" (you can
use either extension as you prefer) omitted.
Test programs must be executable.
For any test programs that need to be compiled, add build rules for
them in Makefile.am, similar to:
tests_libtap_c_basic_LDADD = tests/tap/libtap.a
and add them to check_PROGRAMS. If you include the float.c add-on in
your libtap library, you will need to add -lm to the _LDADD setting
for all test programs linked against it.
A more complex example from the remctl package that needs additional
libraries:
tests_client_open_t_LDFLAGS = $(GSSAPI_LDFLAGS)
tests_client_open_t_LDADD = client/libremctl.la tests/tap/libtap.a \
util/libutil.la $(GSSAPI_LIBS)
If the test program doesn't need to be compiled, add it to EXTRA_DIST
so that it will be included in the distribution.
* If you have test programs written in shell, copy tests/tap/libtap.sh
the tap subdirectory of your tests directory and add it to EXTRA_DIST.
Shell programs should start with:
. "${C_TAP_SOURCE}/tap/libtap.sh"
and can then use the functions defined in the library.
* Optionally copy docs/writing-tests into your package somewhere, such
as tests/README, as instructions to contributors on how to write tests
for this framework.
If you have configuration files that the user must create to enable some
of the tests, conventionally they go into tests/config.
If you have data files that your test cases use, conventionally they go
into tests/data. You can then find the data directory relative to the
C_TAP_SOURCE environment variable (set by runtests) in your test
program. If you have data that's compiled or generated by Autoconf, it
will be relative to the BUILD environment variable. Don't forget to add
test data to EXTRA_DIST as necessary.
For more TAP library add-ons, generally ones that rely on additional
portability code not shipped in this package or with narrower uses, see
the rra-c-util package [1]. There are several additional TAP library
add-ons in the tests/tap directory in that package. It's also an
example of how to use this test harness in another package.
[1] https://www.eyrie.org/~eagle/software/rra-c-util/
SUPPORT
The C TAP Harness web page at:
https://www.eyrie.org/~eagle/software/c-tap-harness/
will always have the current version of this package, the current
documentation, and pointers to any additional resources.
For bug tracking, use the issue tracker on GitHub:
https://github.com/rra/c-tap-harness/issues
Please be aware that I tend to be extremely busy and work projects often
take priority. I'll save your report and get to it as soon as I can,
but it may take me a couple of months.
SOURCE REPOSITORY
C TAP Harness is maintained using Git. You can access the current
source on GitHub at:
https://github.com/rra/c-tap-harness
or by cloning the repository at:
https://git.eyrie.org/git/devel/c-tap-harness.git
or view the repository via the web at:
https://git.eyrie.org/?p=devel/c-tap-harness.git
The eyrie.org repository is the canonical one, maintained by the author,
but using GitHub is probably more convenient for most purposes. Pull
requests are gratefully reviewed and normally accepted.
LICENSE
The C TAP Harness package as a whole is covered by the following
copyright statement and license:
( run in 0.826 second using v1.01-cache-2.11-cpan-e1769b4cff6 )