xref: /freebsd/contrib/kyua/doc/kyua.conf.5.in (revision 257e70f1d5ee61037c8c59b116538d3b6b1427a2)
1.\" Copyright 2012-2024 The Kyua Authors.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions are
6.\" met:
7.\"
8.\" * Redistributions of source code must retain the above copyright
9.\"   notice, this list of conditions and the following disclaimer.
10.\" * Redistributions in binary form must reproduce the above copyright
11.\"   notice, this list of conditions and the following disclaimer in the
12.\"   documentation and/or other materials provided with the distribution.
13.\" * Neither the name of Google Inc. nor the names of its contributors
14.\"   may be used to endorse or promote products derived from this software
15.\"   without specific prior written permission.
16.\"
17.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28.Dd March 22, 2024
29.Dt KYUA.CONF 5
30.Os
31.Sh NAME
32.Nm kyua.conf
33.Nd Configuration file for the kyua tool
34.Sh SYNOPSIS
35.Fn syntax "int version"
36.Pp
37Variables:
38.Va architecture ,
39.Va execenvs ,
40.Va platform ,
41.Va test_suites ,
42.Va unprivileged_user .
43.Sh DESCRIPTION
44The configuration of Kyua is a simple collection of key/value pairs called
45configuration variables.
46There are configuration variables that have a special meaning to the runtime
47engine implemented by
48.Xr kyua 1 ,
49and there are variables that only have meaning in the context of particular
50test suites.
51.Pp
52Configuration files are Lua scripts.
53In their most basic form, their whole purpose is to assign values to
54variables, but the user has the freedom to implement any logic he desires
55to compute such values.
56.Ss File versioning
57Every
58.Nm
59file starts with a call to
60.Fn syntax "int version" .
61This call determines the specific schema used by the file so that future
62backwards-incompatible modifications to the file can be introduced.
63.Pp
64Any new
65.Nm
66file should set
67.Fa version
68to
69.Sq 2 .
70.Ss Runtime configuration variables
71The following variables are internally recognized by
72.Xr kyua 1 :
73.Bl -tag -width XX -offset indent
74.It Va architecture
75Name of the system architecture (aka processor type).
76.It Va execenvs
77Whitespace-separated list of execution environment names.
78.Pp
79Only tests which require one of the given execution environments will be run.
80.Pp
81See
82.Xr kyuafile 5
83for the list of possible execution environments.
84.It Va parallelism
85Maximum number of test cases to execute concurrently.
86.It Va platform
87Name of the system platform (aka machine type).
88.It Va unprivileged_user
89Name or UID of the unprivileged user.
90.Pp
91If set, the given user must exist in the system and his privileges will be
92used to run test cases that need regular privileges when
93.Xr kyua 1
94is executed as root.
95.El
96.Ss Test-suite configuration variables
97Each test suite is able to recognize arbitrary configuration variables, and
98their type and meaning is specific to the test suite.
99Because the existence and naming of these variables depends on every test
100suite, this manual page cannot detail them; please refer to the documentation
101of the test suite you are working with for more details on this topic.
102.Pp
103Test-suite specific configuration variables are defined inside the
104.Va test_suites
105dictionary.
106The general syntax is:
107.Bd -literal -offset indent
108test_suites.<test_suite_name>.<variable_name> = <value>
109.Ed
110.Pp
111where
112.Va test_suite_name
113is the name of the test suite,
114.Va variable_name
115is the name of the variable to set, and
116.Va value
117is a value.
118The value can be a string, an integer or a boolean.
119.Sh FILES
120.Bl -tag -width XX
121.It __EGDIR__/kyua.conf
122Sample configuration file.
123.El
124.Sh EXAMPLES
125The following
126.Nm
127shows a simple configuration file that overrides a bunch of the built-in
128.Xr kyua 1
129configuration variables:
130.Bd -literal -offset indent
131syntax(2)
132
133architecture = 'x86_64'
134platform = 'amd64'
135.Ed
136.Pp
137The following is a more complex example that introduces the definition of
138per-test suite configuration variables:
139.Bd -literal -offset indent
140syntax(2)
141
142-- Assign built-in variables.
143unprivileged_user = '_tests'
144
145-- Assign test-suite variables.  All of these must be strings.
146test_suites.NetBSD.file_systems = 'ffs ext2fs'
147test_suites.X11.graphics_driver = 'vesa'
148.Ed
149.Sh SEE ALSO
150.Xr kyua 1
151