OpenAFS Master Repository branch, master, updated. BP--openafs-stable-1_6_x-1147-g92825d6
Gerrit Code Review
gerrit@openafs.org
Thu, 28 Apr 2011 20:25:03 -0700 (PDT)
The following commit has been merged in the master branch:
commit 92825d6d65dad47c86bee7b3e57618e983e6cf47
Author: Russ Allbery <rra@stanford.edu>
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
changes.
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.
Change-Id: I3ef84218f0e3a8b75f550c8b629b058330659b31
Reviewed-on: http://gerrit.openafs.org/4589
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.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