2008-02-04 23:21:48 +03:00
|
|
|
Automated Testing Framework (atf)
|
|
|
|
The NetBSD Foundation, Inc.
|
|
|
|
---------------------------------------------------------------------------
|
2007-11-12 17:50:50 +03:00
|
|
|
|
|
|
|
|
2008-02-04 23:21:48 +03:00
|
|
|
Introduction
|
|
|
|
============
|
2007-11-12 17:50:50 +03:00
|
|
|
|
2008-02-04 23:21:48 +03:00
|
|
|
ATF uses the GNU Automake, GNU Autoconf and GNU Libtool utilities as its
|
|
|
|
build system. These are used only when compiling the application from the
|
|
|
|
source code package. If you want to install ATF from a binary package, you
|
|
|
|
do not need to read this document.
|
2007-11-12 17:50:50 +03:00
|
|
|
|
2008-02-04 23:21:48 +03:00
|
|
|
For the impatient:
|
2007-11-12 17:50:50 +03:00
|
|
|
|
2008-02-04 23:21:48 +03:00
|
|
|
$ ./configure
|
|
|
|
$ make
|
|
|
|
$ make check
|
|
|
|
Gain root privileges
|
|
|
|
# make install
|
|
|
|
Drop root privileges
|
|
|
|
$ make installcheck
|
2007-11-12 17:50:50 +03:00
|
|
|
|
2008-02-04 23:21:48 +03:00
|
|
|
Or alternatively, install as a regular user into your home directory:
|
2007-11-12 17:50:50 +03:00
|
|
|
|
2008-02-04 23:21:48 +03:00
|
|
|
$ ./configure --prefix ~/local
|
|
|
|
$ make
|
|
|
|
$ make check
|
|
|
|
$ make install
|
|
|
|
$ make installcheck
|
2007-11-12 17:50:50 +03:00
|
|
|
|
|
|
|
|
2008-02-04 23:21:48 +03:00
|
|
|
Dependencies
|
|
|
|
============
|
2007-11-12 17:50:50 +03:00
|
|
|
|
2008-02-04 23:21:48 +03:00
|
|
|
To build and use ATF successfully you need:
|
2007-11-12 17:50:50 +03:00
|
|
|
|
2008-02-04 23:21:48 +03:00
|
|
|
* A standards-compliant C/C++ complier. For example, GNU GCC 2.95 will not
|
|
|
|
work.
|
|
|
|
* A POSIX shell interpreter.
|
|
|
|
* A make(1) utility.
|
2007-11-12 17:50:50 +03:00
|
|
|
|
2008-02-04 23:21:48 +03:00
|
|
|
If you are building ATF from the code on the repository, you will also need
|
|
|
|
the following tools. The versions listed here are the ones used to build
|
|
|
|
the files bundled in the last formal release, but these are not strictly
|
|
|
|
required. Newer ones will most likely work and, maybe, some slightly older
|
|
|
|
ones:
|
2007-11-12 17:50:50 +03:00
|
|
|
|
2008-02-04 23:21:48 +03:00
|
|
|
* GNU autoconf 2.61
|
2008-05-01 19:22:19 +04:00
|
|
|
* GNU automake 1.10.1
|
2008-02-04 23:21:48 +03:00
|
|
|
* GNU libtool 1.5.24 (1.1220.2.455 2007/06/24 02:13:29)
|
2007-11-12 17:50:50 +03:00
|
|
|
|
|
|
|
|
2008-02-04 23:21:48 +03:00
|
|
|
Regenerating the build system
|
|
|
|
=============================
|
2007-11-12 17:50:50 +03:00
|
|
|
|
2008-02-04 23:21:48 +03:00
|
|
|
If you are building ATF from code extracted from the repository, you must
|
|
|
|
first regenerate the files used by the build system. You will also need to
|
|
|
|
do this if you modify one of configure.ac or Makefile.am. To do this,
|
|
|
|
simply run:
|
2007-11-12 17:50:50 +03:00
|
|
|
|
2008-02-04 23:21:48 +03:00
|
|
|
$ autoreconf -is
|
2007-11-12 17:50:50 +03:00
|
|
|
|
2008-02-04 23:21:48 +03:00
|
|
|
For formal releases, no extra steps are needed.
|
2007-11-12 17:50:50 +03:00
|
|
|
|
|
|
|
|
2008-02-04 23:21:48 +03:00
|
|
|
General build procedure
|
|
|
|
=======================
|
2007-11-12 17:50:50 +03:00
|
|
|
|
2008-02-04 23:21:48 +03:00
|
|
|
To build and install the source package, you must follow these steps:
|
2007-11-12 17:50:50 +03:00
|
|
|
|
2008-02-04 23:21:48 +03:00
|
|
|
1. Configure the sources to adapt to your operating system. This is done
|
|
|
|
using the 'configure' script located on the sources' top directory, and
|
|
|
|
it is usually invoked without arguments unless you want to change the
|
|
|
|
installation prefix. More details on this procedure are given on a
|
|
|
|
later section.
|
2007-11-12 17:50:50 +03:00
|
|
|
|
2008-02-04 23:21:48 +03:00
|
|
|
2. Build the sources to generate the binaries and scripts. Simply run
|
|
|
|
'make' on the sources' top directory after configuring them. No
|
|
|
|
problems should arise.
|
2007-11-12 17:50:50 +03:00
|
|
|
|
2008-02-04 23:21:48 +03:00
|
|
|
3. Check that the programs built in the previous step work before
|
|
|
|
installing them. Run 'make check' for this. Any serious problems will
|
|
|
|
pop up here. (Be aware that on, some systems, GNU Libtool will break
|
|
|
|
these checks. If you get some failures, try reconfiguring the project
|
|
|
|
providing the '--disable-fast-install' flag to 'configure' and then
|
|
|
|
rebuild and recheck.
|
|
|
|
|
|
|
|
4. Install the program by running 'make install'. You may need to become
|
|
|
|
root to issue this step.
|
|
|
|
|
|
|
|
5. Issue any manual installation steps that may be required. These are
|
|
|
|
described later in their own section.
|
|
|
|
|
|
|
|
6. Check that the installed programs work by running 'make installcheck'.
|
|
|
|
You do not need to be root to do this, even though some checks will not
|
|
|
|
be run otherwise.
|
|
|
|
|
|
|
|
|
|
|
|
Configuration flags
|
|
|
|
===================
|
|
|
|
|
|
|
|
The most common, standard flags given to 'configure' are:
|
|
|
|
|
|
|
|
* Flag: --prefix=directory
|
|
|
|
Possible values: Any path
|
|
|
|
Default: /usr/local
|
|
|
|
|
|
|
|
Specifies where the program (binaries and all associated files) will be
|
|
|
|
installed.
|
|
|
|
|
|
|
|
* Flag: --sysconfdir=directory
|
|
|
|
Possible values: Any path
|
|
|
|
Default: /usr/local/etc
|
|
|
|
|
|
|
|
Specifies where the installed programs will look for configuration files.
|
|
|
|
'/atf' will be appended to the given path unless ATF_CONFSUBDIR is
|
|
|
|
redefined as explained later on.
|
|
|
|
|
|
|
|
* Flag: --help
|
|
|
|
|
|
|
|
Shows information about all available flags and exits immediately,
|
|
|
|
without running any configuration tasks.
|
|
|
|
|
|
|
|
The following flags are specific to ATF's 'configure' script:
|
|
|
|
|
|
|
|
* Variable: ATF_CONFSUBDIR
|
|
|
|
Possible values: empty, a relative path.
|
|
|
|
Default: atf.
|
|
|
|
|
|
|
|
Specifies the subdirectory of the configuration directory (given by the
|
|
|
|
--sysconfdir argument) under which ATF will search for its configuration
|
|
|
|
files.
|
|
|
|
|
|
|
|
* Variable: ATF_WORKDIR
|
|
|
|
Possible values: empty, an absolute path.
|
|
|
|
Default: /tmp or /var/tmp, depending on availability.
|
|
|
|
|
|
|
|
Specifies the directory that ATF will use to place its temporary files
|
|
|
|
and work directories for test cases. This is just a default and can
|
|
|
|
be overriden at run time.
|
|
|
|
|
|
|
|
* Flag: --enable-developer
|
|
|
|
Possible values: yes, no
|
|
|
|
Default: Depends on the version number. Stable versions define this
|
|
|
|
to 'no' while all others have it set to 'yes'.
|
|
|
|
|
|
|
|
Enables several features useful for development, such as the inclusion
|
|
|
|
of debugging symbols in all objects or the enabling of warnings during
|
|
|
|
compilation.
|
|
|
|
|
|
|
|
* Flag: --enable-unstable-shared
|
|
|
|
Possible values: yes, no
|
|
|
|
Default: no.
|
|
|
|
|
|
|
|
Forces the building of shared libraries in addition to static ones.
|
|
|
|
The build of shared libraries is currently disabled because their ABIs
|
|
|
|
and APIs are unstable and subject to change. This flag is provided for
|
|
|
|
development purposes only and will be removed once the libraries are
|
|
|
|
stable enough.
|
|
|
|
|
|
|
|
|
|
|
|
Post-installation steps
|
|
|
|
=======================
|
|
|
|
|
|
|
|
After installing ATF, you have to register the DTDs it provides into the
|
|
|
|
system-wide XML catalog. See the comments at the top of the files in
|
|
|
|
${datadir}/share/xml/atf to see the correct public identifiers. This
|
|
|
|
directory will typically be /usr/local/share/xml/atf or /usr/share/xml/atf.
|
|
|
|
Failure to do so will lead to further errors when processing the XML
|
|
|
|
files generated by atf-report.
|
|
|
|
|
|
|
|
|
|
|
|
---------------------------------------------------------------------------
|
|
|
|
End of document
|