1c243e490SMarcel Moolenaar.\" 2c243e490SMarcel Moolenaar.\" Automated Testing Framework (atf) 3c243e490SMarcel Moolenaar.\" 4c243e490SMarcel Moolenaar.\" Copyright (c) 2007 The NetBSD Foundation, Inc. 5c243e490SMarcel Moolenaar.\" All rights reserved. 6c243e490SMarcel Moolenaar.\" 7c243e490SMarcel Moolenaar.\" Redistribution and use in source and binary forms, with or without 8c243e490SMarcel Moolenaar.\" modification, are permitted provided that the following conditions 9c243e490SMarcel Moolenaar.\" are met: 10c243e490SMarcel Moolenaar.\" 1. Redistributions of source code must retain the above copyright 11c243e490SMarcel Moolenaar.\" notice, this list of conditions and the following disclaimer. 12c243e490SMarcel Moolenaar.\" 2. Redistributions in binary form must reproduce the above copyright 13c243e490SMarcel Moolenaar.\" notice, this list of conditions and the following disclaimer in the 14c243e490SMarcel Moolenaar.\" documentation and/or other materials provided with the distribution. 15c243e490SMarcel Moolenaar.\" 16c243e490SMarcel Moolenaar.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND 17c243e490SMarcel Moolenaar.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, 18c243e490SMarcel Moolenaar.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19c243e490SMarcel Moolenaar.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20c243e490SMarcel Moolenaar.\" IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY 21c243e490SMarcel Moolenaar.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22c243e490SMarcel Moolenaar.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 23c243e490SMarcel Moolenaar.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24c243e490SMarcel Moolenaar.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 25c243e490SMarcel Moolenaar.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 26c243e490SMarcel Moolenaar.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 27c243e490SMarcel Moolenaar.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28c243e490SMarcel Moolenaar.\" 29*b9306c04SCraig Rodrigues.Dd March 2, 2014 30c243e490SMarcel Moolenaar.Dt ATF-TEST-PROGRAM 1 31c243e490SMarcel Moolenaar.Os 32c243e490SMarcel Moolenaar.Sh NAME 33c243e490SMarcel Moolenaar.Nm atf-test-program 34c243e490SMarcel Moolenaar.Nd common interface to ATF test programs 35c243e490SMarcel Moolenaar.Sh SYNOPSIS 36c243e490SMarcel Moolenaar.Nm 37c243e490SMarcel Moolenaar.Op Fl r Ar resfile 38c243e490SMarcel Moolenaar.Op Fl s Ar srcdir 39c243e490SMarcel Moolenaar.Op Fl v Ar var1=value1 Op .. Fl v Ar varN=valueN 40c243e490SMarcel Moolenaar.Ar test_case 41c243e490SMarcel Moolenaar.Nm 42c243e490SMarcel Moolenaar.Fl l 43c243e490SMarcel Moolenaar.Sh DESCRIPTION 44c243e490SMarcel MoolenaarTest programs written using the ATF libraries all share a common user 45c243e490SMarcel Moolenaarinterface, which is what this manual page describes. 46c243e490SMarcel Moolenaar.Em NOTE: There is no binary known as 47c243e490SMarcel Moolenaar.Nm ; 48c243e490SMarcel Moolenaar.Em what is described in this manual page is the command-line interface 49c243e490SMarcel Moolenaar.Em exposed by the atf-c, atf-c++ and atf-sh bindings . 50c243e490SMarcel Moolenaar.Pp 51c243e490SMarcel MoolenaarIn the first synopsis form, the test program will execute the provided 52c243e490SMarcel Moolenaartest case and print its results to the standard output, unless otherwise 53c243e490SMarcel Moolenaarstated by the 54c243e490SMarcel Moolenaar.Fl r 55c243e490SMarcel Moolenaarflag. 56c243e490SMarcel MoolenaarOptionally, the test case name can be suffixed by 57c243e490SMarcel Moolenaar.Sq :cleanup , 58c243e490SMarcel Moolenaarin which case the cleanup routine of the test case will be executed 59c243e490SMarcel Moolenaarinstead of the test case body; see 60c243e490SMarcel Moolenaar.Xr atf-test-case 4 . 61c243e490SMarcel MoolenaarNote that the test case is 62c243e490SMarcel Moolenaar.Em executed without isolation , 63c243e490SMarcel Moolenaarso it can and probably will create and modify files in the current directory. 64*b9306c04SCraig RodriguesTo execute test cases in a controller manner, you need a runtime engine 65*b9306c04SCraig Rodriguesthat understands the ATF interface. 66*b9306c04SCraig RodriguesThe recommended runtime engine is 67*b9306c04SCraig Rodrigues.Xr kyua 1 . 68c243e490SMarcel MoolenaarYou should only execute test cases by hand for debugging purposes. 69c243e490SMarcel Moolenaar.Pp 70c243e490SMarcel MoolenaarIn the second synopsis form, the test program will list all available 71c243e490SMarcel Moolenaartest cases alongside their meta-data properties in a format that is 72c243e490SMarcel Moolenaarmachine parseable. 73c243e490SMarcel MoolenaarThis list is processed by 74*b9306c04SCraig Rodrigues.Xr kyua 1 75c243e490SMarcel Moolenaarto know how to execute the test cases of a given test program. 76c243e490SMarcel Moolenaar.Pp 77c243e490SMarcel MoolenaarThe following options are available: 78c243e490SMarcel Moolenaar.Bl -tag -width XvXvarXvalueXX 79c243e490SMarcel Moolenaar.It Fl l 80c243e490SMarcel MoolenaarLists available test cases alongside a brief description for each of them. 81c243e490SMarcel Moolenaar.It Fl r Ar resfile 82c243e490SMarcel MoolenaarSpecifies the file that will receive the test case result. 83c243e490SMarcel MoolenaarIf not specified, the test case prints its results to stdout. 84c243e490SMarcel MoolenaarIf the result of a test case needs to be parsed by another program, you must 85c243e490SMarcel Moolenaaruse this option to redirect the result to a file and then read the resulting 86c243e490SMarcel Moolenaarfile from the other program. 87c243e490SMarcel MoolenaarNote: 88c243e490SMarcel Moolenaar.Em do not try to process the stdout of the test case 89c243e490SMarcel Moolenaarbecause your program may break in the future. 90c243e490SMarcel Moolenaar.It Fl s Ar srcdir 91c243e490SMarcel MoolenaarThe path to the directory where the test program is located. 92c243e490SMarcel MoolenaarThis is needed in all cases, except when the test program is being executed 93c243e490SMarcel Moolenaarfrom the current directory. 94c243e490SMarcel MoolenaarThe test program will use this path to locate any helper data files or 95c243e490SMarcel Moolenaarutilities. 96c243e490SMarcel Moolenaar.It Fl v Ar var=value 97c243e490SMarcel MoolenaarSets the configuration variable 98c243e490SMarcel Moolenaar.Ar var 99c243e490SMarcel Moolenaarto the value 100c243e490SMarcel Moolenaar.Ar value . 101c243e490SMarcel Moolenaar.El 102c243e490SMarcel Moolenaar.Sh SEE ALSO 103*b9306c04SCraig Rodrigues.Xr kyua 1 104