source: trunk/test/README @ 952

Last change on this file since 952 was 952, checked in by Peter Johansson, 13 years ago

introducing init.sh and using it. Added a README file in test directory including info on how to use init.sh. refs #418

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.8 KB
Line 
1$Id: README 952 2009-12-06 07:42:30Z peter $
2
3    The svndigest test suite
4
5
6Usage:
7========
8
9Running all tests
10-----------------
11
12  make check
13
14
15Interpretation
16--------------
17
18  Successes:
19    PASS  - success
20    XFAIL - expected failure
21
22  Failures:
23    FAIL  - failure
24    XPASS - unexpected success
25
26  Other:
27    SKIP  - skipped test
28
29
30Getting details from failures
31-----------------------------
32
33  You can run a specific test directly. Add a '-v' flag to trigger verbosity
34
35    ./program_test -v
36
37  If you want to run the test suite in verbose mode, you can invoke
38  make as follows:
39
40    make check VERBOSE=1
41
42  If you want to run only a subset of tests, you can invoke make as follows
43
44    make check TESTS="first_test second_test"
45
46
47Reporting failures
48------------------
49
50  Open a 'New Ticket' in the issue tracking system
51  (http://dev.thep.lu.se/svndigest) with verbose output of failing
52  tests along with which version of svndigest and which operating
53  system etc. Alternatively, you can send a bug report to the address
54  given in the failed `make check' or in `configure --help'.
55
56
57
58Writing tests
59=============
60
61  If you plan to fix a bug, write the test first. This way you will
62  make sure the test catches the bug, and that it succeeds once you
63  have fixed the bug.
64
65  Use the test::Suite class liberally. See other tests for examples of
66  typical usage.
67
68  Tests shall return 0 at success and -1 otherwise (see
69  test::Suite::return_value()). If the test should be skipped for some
70  reason it shall return 77.
71
72  When a test is run without verbose flag, it should be silent also at
73  failure. Achieve this behaviour by sending output through
74  test::Suite::out().
75
76  If a test needs a data file, place the data in directory
77  'test/data'. However, you should feel free to re-use the data files
78  already there. It should be possible to run the test suite also in a
79  VPATH build in which builddir and srcdir are not the same. To avoid
80  problems with files not found in VPATH builds, use the function
81  test::filename() which gives you the absolute path to the file.
82
83
84======================================================================
85Copyright (C) 2009 Peter Johansson
86
87This file is part of svndigest, http://dev.thep.lu.se/svndigest
88
89The svndigest is free software; you can redistribute it and/or modify
90it under the terms of the GNU General Public License as published by
91the Free Software Foundation; either version 3 of the License, or (at
92your option) any later version.
93
94The svndigest is distributed in the hope that it will be useful, but
95WITHOUT ANY WARRANTY; without even the implied warranty of
96MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
97General Public License for more details.
98
99You should have received a copy of the GNU General Public License
100along with svndigest. If not, see <http://www.gnu.org/licenses/>.
101======================================================================
102
103
Note: See TracBrowser for help on using the repository browser.