cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Andrew Price <anprice@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 3/5] gfs2-utils tests: Improve docs
Date: Wed, 14 Jan 2015 16:16:19 +0000	[thread overview]
Message-ID: <1421252181-20776-3-git-send-email-anprice@redhat.com> (raw)
In-Reply-To: <1421252181-20776-1-git-send-email-anprice@redhat.com>

Add a pointer to doc/README.tests in README.build and be more consistent
about how the test suite is run in doc/README.tests. Add example usage
and mention the TOPTS argument.

Signed-off-by: Andrew Price <anprice@redhat.com>
---
 README.build     |  3 ++-
 doc/README.tests | 32 ++++++++++++++++++++++++--------
 2 files changed, 26 insertions(+), 9 deletions(-)

diff --git a/README.build b/README.build
index 2aad6ab..f4ebe53 100644
--- a/README.build
+++ b/README.build
@@ -29,4 +29,5 @@ To install gfs2-utils, run:
 
     make install
 
-See also doc/README.contributing for details on submitting patches.
+See also doc/README.contributing for details on submitting patches and
+doc/README.tests for more details regarding the test suite.
diff --git a/doc/README.tests b/doc/README.tests
index 79f51f6..1b90a0c 100644
--- a/doc/README.tests
+++ b/doc/README.tests
@@ -1,16 +1,30 @@
 Working with the gfs2-utils test suite
 --------------------------------------
 
+Overview
+--------
 The test suite in the tests directory of the gfs2-utils source tree is based on
 the Autotest framework provided by Autoconf. The basic idea is that the
 testsuite.at file is the main source file for the tests, written in m4 and
-generating a bourne shell script called testsuite.
+generating a bourne shell script called testsuite, which we run with 'make check'.
 
-When run, either using 'make check' or directly from within the tests
-directory, the testsuite script sources atconfig and atlocal for configuration
-and then runs the whole testsuite or a specified set of tests (see ./testsuite
--h for help).
+When run, the test suite sources tests/atconfig and tests/atlocal for
+configuration and then runs the whole suite or a specified set of tests,
+depending on options passed to the test suite using TOPTS. For example, to see
+a list of available options, use 'make check TOPTS=-h' and to see a numbered
+list of the available tests, use 'make check TOPTS=-l'.
 
+A subset of the available tests can be run using keywords and/or by specifying
+the test ID numbers in TOPTS, e.g. make check TOPTS='-k mkfs 24 25'
+
+Test output is captured and, if a test fails, a log is kept in
+tests/testsuite.dir/$n/testsuite.log where $n is the test's ID number. Failed
+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
+-------------
 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
@@ -32,15 +46,17 @@ do not fit into an existing category, in which case AT_BANNER can be used to
 group them, and they can be organised into a new .at file and sourced from
 testsuite.at.
 
-Since the tests can be run individually (e.g. ./testsuite 15) any new tests
-which require the dummy volume $GFS_TGT to be present should call GFS_TGT_REGEN
-before attempting to use it.
+As the tests can be run individually, any new tests which require the dummy
+volume $GFS_TGT to be present should call GFS_TGT_REGEN before attempting to
+use it.
 
 Documentation for Autotest, including the AT_* macros used to define tests, can
 be found in the autoconf manual at:
 
     http://www.gnu.org/software/autoconf/manual/index.html
 
+Generating coverage reports
+---------------------------
 Test coverage instrumentation can be enabled using the --enable-gcov option at
 the configure stage. Once the tools have been built and run with this option
 enabled, coverage data will be written to files in the source directories for
-- 
1.9.3



  parent reply	other threads:[~2015-01-14 16:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-14 16:16 [Cluster-devel] [PATCH 1/5] gfs2-utils tests: Add keywords to tests Andrew Price
2015-01-14 16:16 ` [Cluster-devel] [PATCH 2/5] gfs2-utils tests: Shorten TESTSUITEFLAGS to TOPTS Andrew Price
2015-01-14 16:16 ` Andrew Price [this message]
2015-01-14 16:16 ` [Cluster-devel] [PATCH 4/5] gfs2-utils tests: Skip unit tests if check is not found Andrew Price
2015-01-14 16:16 ` [Cluster-devel] [PATCH 5/5] gfs2-utils tests: Document usage of convenience macros Andrew Price

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1421252181-20776-3-git-send-email-anprice@redhat.com \
    --to=anprice@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).