This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch master
in repository gfs2-utils.
commit 724e23d3ff39d27e15c2c21225858fcf732a0336
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Fri Sep 11 15:14:09 2020 +0100
Describe the unit tests in README.tests
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
doc/README.tests | 31 +++++++++++++++++++++++++++++--
1 file changed, 29 insertions(+), 2 deletions(-)
diff --git a/doc/README.tests b/doc/README.tests
index 1b90a0c..292d2ae 100644
--- a/doc/README.tests
+++ b/doc/README.tests
@@ -23,8 +23,8 @@ tests can be re-run using make check TOPTS='--recheck' although
it's better to
re-run the entire suite after fixing tests as a fix for one test could break
another.
-Writing tests
--------------
+Smoke/regression tests
+----------------------
A number of GFS2-specific convenience macros have been defined in testsuite.at
to make defining new tests quick and easy. Also, some variables have been
defined in atlocal.in so that full paths to programs do not have to be included
@@ -55,6 +55,33 @@ be found in the autoconf manual at:
http://www.gnu.org/software/autoconf/manual/index.html
+Unit tests
+----------
+A unit test framework for each of the main utils and libgfs2 is included in its
+source directory. These tests are based on the libcheck C unit test library and
+are built and run by 'make check'. Generally, there should be one check
"Suite"
+defined for each source file of the util, named with a check_ prefix,
+containing one or more test cases defined for each externally-visible function.
+For example:
+
+ check_libgfs2 (main file: check_libgfs2.c)
+ |--------Suite: rgrp.c (in check_rgrp.c)
+ | |---------- Test case: test_rbm_find_good
+ | |-----------Test case: test_rbm_find_bad
+ |--------Suite: meta.c (in check_meta.c)
+ | |-----------Test case: test_lgfs2_meta
+ etc. etc.
+
+The build rules for the unit tests are separated into a checks.am file in each
+source directory. Documentation for writing libcheck unit tests can be found
+at:
+
+
https://libcheck.github.io/check/doc/check_html/index.html
+
+Autoconf's automatically generated test driver script only prints one line for
+each unit test executable run instead of one line per test case. To view
+details of unit test failures, see the generated .log and .trs files.
+
Generating coverage reports
---------------------------
Test coverage instrumentation can be enabled using the --enable-gcov option at
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.