ADETEST(1) General Commands Manual ADETEST(1)
NAME
adetest - a test harness
SYNOPSIS
adetest [ -V | --version ] [ -v | --verbose | -d level | --debug=level
] [ -h | --help ] [ -p | --paths ] [ -n | --simulate ] [
--args-are-generators ] [ -g | --generate ] [ -t | --test ] [ -r |
--run ] [ -k | --keep-output-files ] testcmd ...
DESCRIPTION
Adetest is a test harness.
A test consists of a program or program sources that when run success-
fully may produce some output and return a zero exit status. Adetest
will invoke make(1) to make the test before it executes it.
Normally, while the test is being developed, adetest should be used in
'run' mode. When the output and exit code are correct then run adetest
in 'generate' mode to generate the reference file. Thereafter run ade-
test in 'test' mode (the default) to run the test, check the output
matches the reference file, and that the test still returns a zero exit
status.
CONFIGURATION
Normally adetest is invoked from a Makefile in a ADE-based module, and
in this context configuration is beyond the scope of this manual page.
OPTIONS
-d level, --debug=level Determines how verbose this program will be.
The message types displayed for the different
values of level are as follows: 0 displays no
messages; 1 displays only errors, 2 displays
errors and warnings; 3 displays errors, warn-
ings and informational messages; higher values
display errors, warnings, informational mes-
sages and various messages intended for debug-
ging. The default is 2.
-h, --help Displays a brief usage message.
-p, --paths Lists the compiled-in paths of various files
and directories that this program uses. -n,
--simulate Some external commands that this
program runs may be displayed rather than ac-
tually executed. BEWARE: different programs
implement different levels of simulation; so
this option may work perfectly; on the other
hand it may do nothing at all!
-v, --verbose Equivalent to -d 3.
-V, --version Prints the program's version number and exits.
--args-are-generators Instead of interpreting arguments as tests to
execute, they will be interpreted as scripts
whose standard output lists the tests to exe-
cute.
-g, --generate Generates the reference files.
-h, --help Displays a brief usage message.
-k, --keep-output-files Prevents the usual deletion of the sandpit
when the test completes.
-r, --run Run the test without capturing its output, but
do not compare with the reference file.
-t, --test Run the test, check the exit status is zero,
and check the resulting output matches the
reference file. This is the default behaviour.
EXIT STATUS
On success adetest returns zero. On failure it returns non-zero and
displays a diagnostic message.
FILES
./bin directory for tests and/or their sources
./ref directory for test reference files
./out directory for test outputs, the files in this
directory can be considered temporary.
./tmp/adetest.pid.sandpit-testname
The sandpit.
ENVIRONMENT VARIABLES
ADETEST_MODROOT Adetest sets this to point at the base of the
module before invoking the test. This is to
help the test find any data files it may need,
and to allow it to strip out (typically with
sed(1)) any output which varies depending on
where the module is located in the filesystem
hierarchy.
MAKE Set to the path of the make(1) command.
PATH, LD_LIBRARY_PATH, PERL5LIB
Set to ensure that commands, libraries and
Perl libraries from the module's sources are
found before any installed elsewhere.
EXAMPLES
The following commands will create and run a very simple test:
mkdir bin out ref tmp
echo -e '#!/bin/bash\ntrue' > bin/simple.sh
adetest -g -v bin/simple
adetest -v bin/simple
CAVEATS
None.
STANDARDS
This manual page documents version ADE_APP_TOKEN_RELEASE_ID of adetest.
SEE ALSO
adegmt(1), sed(1), make(1), ade-config(1)
AUTHOR
ADE_APP_TOKEN_AUTHOR_NAME <ADE_APP_TOKEN_AUTHOR_EMAIL>
COPYRIGHT & DISTRIBUTION POLICY
Copyright (C) 2002-ADE_APP_TOKEN_RELEASE_YEAR ADE_APP_TOKEN_AUTHOR_NAME
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MER-
CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
675 Mass Ave, Cambridge, MA 02139, USA.
ADE_APP_TOKEN_RELEASE_DATE_MAN ADETEST(1)