OpenAFS Master Repository branch, master, updated. BP--openafs-stable-1_6_x-1147-g92825d6
Gerrit Code Review
Thu, 28 Apr 2011 20:25:03 -0700 (PDT)
The following commit has been merged in the master branch:
Author: Russ Allbery <email@example.com>
Date: Thu Apr 28 13:00:43 2011 -0700
Resync test harness with C TAP Harness 1.7
Includes the following upstream changes:
Add a more complete usage message to runtests and add support for a -h
command-line flag to display the usage message.
is_double() now takes a third argument, an epsilon. Two numbers are
considered equal if their absolute difference is less than epsilon.
is_double() also now treats wanted and seen values of NaN (not a
number) as equal. Thanks to PICCA Frédéric-Emmanuel for the proposed
The ok_program function in the shell libtap.sh library no longer
strips text after a colon and a space from the program output if the
expected status is non-zero. Instead, if program output may contain
system-specific error messages after a colon and a space, put the new
function strip_colon_error before the program to do this stripping.
Thanks to Carsten Hey for the idea.
strip_colon_error is now smarter about preserving an initial word
ending in a colon (which is generally the program name) while still
stripping error messages later in the line.
The test_file_path function in the shell libtap.sh library now always
returns the empty string, rather than possible absolute paths starting
at /, if $BUILD and $SOURCE are not set.
Flush standard error in the C TAP library before printing results for
more deterministic output. Thanks to Carsten Hey for the idea.
All of C TAP Harness now compiles with gcc -ansi -pedantic and should
be fully C89-compatible. Note that either C99 or SUSv3 is required to
build C TAP Harness. (This should not be a problem on any modern
platform.) Based on work by Carsten Hey.
Simplify and improve output formatting in the summary of failing tests
in some edge cases.
Add explicit license statements to the files meant to be copied into
other packages rather than referring to LICENSE.
Add a test_file_path() function to the basic C and shell TAP
libraries, which searches the build and source directories for a
particular file and returns the full path. This is a utility function
that can be used to find test data files.
Reviewed-by: Derrick Brashear <firstname.lastname@example.org>
Tested-by: BuildBot <email@example.com>
tests/HOWTO | 47 +++++++++++++++----
tests/runtests.c | 128 ++++++++++++++++++++++++++++++++++++--------------
tests/tap/basic.c | 121 ++++++++++++++++++++++++++++++++++++++++++------
tests/tap/basic.h | 42 +++++++++++++----
tests/tap/libtap.sh | 73 ++++++++++++++++++++++++++---
5 files changed, 333 insertions(+), 78 deletions(-)
OpenAFS Master Repository