atf-check.1 (256281) | atf-check.1 (272307) |
---|---|
1.\" 2.\" Automated Testing Framework (atf) 3.\" 4.\" Copyright (c) 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 --- 12 unchanged lines hidden (view full) --- 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.\" | 1.\" 2.\" Automated Testing Framework (atf) 3.\" 4.\" Copyright (c) 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 --- 12 unchanged lines hidden (view full) --- 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 June 27, 2010 | 29.Dd March 2, 2014 |
30.Dt ATF-CHECK 1 31.Os 32.Sh NAME 33.Nm atf-check 34.Nd executes a command and analyzes its results 35.Sh SYNOPSIS 36.Nm 37.Op Fl s Ar qual:value --- 75 unchanged lines hidden (view full) --- 113.Sq not- 114string, which effectively reverses the check. 115.It Fl e Ar action:arg 116Analyzes standard error (syntax identical to above) 117.It Fl x 118Executes 119.Ar command 120as a shell command line, executing it with the system shell defined by | 30.Dt ATF-CHECK 1 31.Os 32.Sh NAME 33.Nm atf-check 34.Nd executes a command and analyzes its results 35.Sh SYNOPSIS 36.Nm 37.Op Fl s Ar qual:value --- 75 unchanged lines hidden (view full) --- 113.Sq not- 114string, which effectively reverses the check. 115.It Fl e Ar action:arg 116Analyzes standard error (syntax identical to above) 117.It Fl x 118Executes 119.Ar command 120as a shell command line, executing it with the system shell defined by |
121.Va ATF_SHELL 122in 123.Xr atf-config 1 . | 121.Va ATF_SHELL . |
124You should avoid using this flag if at all possible to prevent shell quoting 125issues. 126.El 127.Sh EXIT STATUS 128.Nm 129exits 0 on success, and other (unspecified) value on failure. | 122You should avoid using this flag if at all possible to prevent shell quoting 123issues. 124.El 125.Sh EXIT STATUS 126.Nm 127exits 0 on success, and other (unspecified) value on failure. |
128.Sh ENVIRONMENT 129.Bl -tag -width ATFXSHELLXX -compact 130.It Va ATF_SHELL 131Path to the system shell to be used when the 132.Fl x 133is given to run commands. 134.El |
|
130.Sh EXAMPLES 131.Bd -literal -offset indent 132# Exit code 0, nothing on stdout/stderr 133atf-check 'true' 134 135# Typical usage if failure is expected 136atf-check -s not-exit:0 'false' 137 138# Checking stdout/stderr 139echo foobar >expout 140atf-check -o file:expout -e inline:"xx\etyy\en" \e 141 'echo foobar ; printf "xx\etyy\en" >&2' 142 143# Checking for a crash 144atf-check -s signal:sigsegv my_program 145 146# Combined checks 147atf-check -o match:foo -o not-match:bar echo foo baz 148.Ed | 135.Sh EXAMPLES 136.Bd -literal -offset indent 137# Exit code 0, nothing on stdout/stderr 138atf-check 'true' 139 140# Typical usage if failure is expected 141atf-check -s not-exit:0 'false' 142 143# Checking stdout/stderr 144echo foobar >expout 145atf-check -o file:expout -e inline:"xx\etyy\en" \e 146 'echo foobar ; printf "xx\etyy\en" >&2' 147 148# Checking for a crash 149atf-check -s signal:sigsegv my_program 150 151# Combined checks 152atf-check -o match:foo -o not-match:bar echo foo baz 153.Ed |
149.Sh SEE ALSO 150.Xr atf-config 1 , 151.Xr atf 7 | |