- NAME
- SYNOPSIS
- DESCRIPTION
- OPTIONS
- ENVIRONMENT
- EXIT STATUS

# NAME

go - Run lvb test suite.

Version Tag $Id: go,v 1.18 2005/11/01 16:47:46 db60 Exp $

# SYNOPSIS

        go [--test TESTNAME]

# DESCRIPTION

Perl script to run the lvb test suite and display a summary of results.

Tests are assumed to be in subdirectories of the current directory whose names begin with `test`, detected case-insensitively. Within each such directory, there should be a script named `runtest` that will run the test and print `test passed` to the standard output on success. The string `test passed` is detected case-insensitively.

A test may run the pre-built lvb executable indicated by `LVB_EXECUTABLE`.

Alternatively, a test may use its own executable. Subdirectories of the current directory whose names begin with `test_lib` are assumed to contain tests of this kind. They use an executable called `testprog.exe`, which go will build from all `.c` files in the test directory prior to running the test. For building, <go> uses the LVB library indicated by `LVB_LIBRARY`, any other libraries indicated by `LVB_OTHERLIBS`, the extra header path `LVB_HEADER_PATH` and the compiler `CC` with options given by `CFLAGS`. The test itself must launch `testprog.exe` from its `runtest` script.

By convention, all tests should endeavour to print a message starting with (or consisting of) `test failed` to the standard output on failure, but this is not required. No output, or any output that does not match the pattern `"test passed"`, is regarded as indicating failure.

Tests do not have to remove temporary files. go deletes all files in the test directory that were not present at the start of the test.

# OPTIONS

--test TESTNAME

  Run only the test in the directory named TESTNAME. The default is to run all tests.

# ENVIRONMENT

The environment variables below must not contain spaces, with the exception that the space in the string ``My Documents'' is allowed.

LVB_EXECUTABLE

  Must give the filename of the executable to test, including the full path.

LVB_LIBRARY

  Must give the filename of the LVB library to test, including the full path.

LVB_OTHERLIBS

  Must give any non-LVB-specific libraries to be used when building the test executable, either as full paths or as compiler options to appear at the end of the compiler command line. May be empty or unset. On Unix systems, `LVB_OTHERLIBS` should usually be set to `-lm`.

LVB_HEADER_PATH

  Must give the full path to the directory containing the `lvb.h` header describing the interface to the LVB library specified by `LVB_LIBRARY`.

CC

  Must give the name of the C compiler to use when testing the LVB library.

CFLAGS

  Must give other the command-line options to use with the compiler specified by `CC`. May be empty or unset.

# EXIT STATUS

0 if all tests pass and there was no error, nonzero otherwise.