xref: /netbsd-src/external/bsd/atf/dist/tools/atf-config.1 (revision 09afef20633f5fe63d92dfe43ee3a9380dc06883)
1.\"
2.\" Automated Testing Framework (atf)
3.\"
4.\" Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
5.\" All rights reserved.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\" 1. Redistributions of source code must retain the above copyright
11.\"    notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\"    notice, this list of conditions and the following disclaimer in the
14.\"    documentation and/or other materials provided with the distribution.
15.\"
16.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
17.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
18.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20.\" IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
21.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
23.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
26.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
27.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28.\"
29.Dd January 4, 2008
30.Dt ATF-CONFIG 1
31.Os
32.Sh NAME
33.Nm atf-config
34.Nd queries static configuration information of ATF
35.Sh SYNOPSIS
36.Nm
37.Op Fl t
38.Op Ar var1 Op Ar .. varN
39.Nm
40.Fl h
41.Sh DESCRIPTION
42.Nm
43is a utility that queries static configuration information of ATF.
44Static configuration refers to all those values for settings that
45were built into the ATF binaries at build time.
46.Pp
47In the first synopsis form,
48.Nm
49will print variable-value pairs for all built-in static variables if
50no variable names are provided as arguments.
51If any is provided, it will only print the variable-value pairs for
52those variables.
53The output of the utility does not use the
54.Sq =
55symbol to separate the variable name from its corresponding value in
56an attempt to avoid sourcing the output in shell scripts or Makefiles.
57If you need to do that, the
58.Fl t
59flag allows you to query the value of individual variables without any
60surrounding text.
61.Pp
62In the second synopsis form,
63.Nm
64will print information about all supported options and their purpose.
65.Pp
66The following options are available:
67.Bl -tag -width flag
68.It Fl h
69Shows a short summary of all available options and their purpose.
70.It Fl t
71Changes the output of the utility to show the variable values, one
72per line, without the variable names.
73.El
74.Ss Static configuration variables
75The following list describes all the variables that are part of ATF's
76static configuration:
77.Bl -tag -width atfXpkgdatadirXX
78.It Va atf_arch
79The architecture name detected by ATF.
80This is derived from
81.Va atf_machine
82because it is a subset of it.
83Given that this name might be misdetected, it is provided to the user
84as a configuration variable so that he can fix its value temporarily
85until a real fix is incorporated into mainstream sources.
86.It Va atf_confdir
87The path to the directory that contains the system-wide configuration
88files for ATF.
89.It Va atf_libexecdir
90The path to the directory that contains the auxiliary utilities of ATF,
91used internally by the public tools.
92.It Va atf_machine
93The machine type name detected by ATF.
94This should not be tunable but is provided for symmetry with
95.Va atf_arch .
96.It Va atf_pkgdatadir
97The path to the directory that contains the files that form the ATF's
98shell-scripting library.
99.It Va atf_shell
100The path to the shell interpreter that will be used by ATF.
101.It Va atf_workdir
102The path to the temporary directory that the utilities and the test
103programs will use to store temporary files in.
104.El
105.Sh ENVIRONMENT
106Every variable that is part of the static configuration can be
107overridden at run-time by defining an environment variable.
108This environment variable has the exact same name as the one shown by
109.Nm
110except that the name is all composed of uppercase letters.
111.Pp
112The recognized environment variables are:
113.Bl -tag -width ATFXPKGDATADIRXX
114.It Ev ATF_ARCH
115Overrides the built-in value of
116.Va atf_arch .
117.It Ev ATF_CONFDIR
118Overrides the built-in value of
119.Va atf_confdir .
120.It Ev ATF_LIBEXECDIR
121Overrides the built-in value of
122.Va atf_libexecdir .
123.It Ev ATF_MACHINE
124Overrides the built-in value of
125.Va atf_machine .
126.It Ev ATF_PKGDATADIR
127Overrides the built-in value of
128.Va atf_pkgdatadir .
129.It Ev ATF_SHELL
130Overrides the built-in value of
131.Va atf_shell .
132.It Ev ATF_WORKDIR
133Overrides the built-in value of
134.Va atf_workdir .
135.El
136.Sh SEE ALSO
137.Xr atf 7
138