From 8cd1be1adbf33c4d04d4b77406c0b84f1de0a42e Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Fri, 22 Nov 2024 11:02:18 +0100 Subject: [PATCH] devel/debug: wrap this up with a neat manual page --- devel/debug/Makefile | 2 +- devel/debug/src/{sbin => bin}/qyua | 1 + devel/debug/src/man/man1/qyua.1 | 99 ++++++++++++++++++++++++++++++ 3 files changed, 101 insertions(+), 1 deletion(-) rename devel/debug/src/{sbin => bin}/qyua (98%) create mode 100644 devel/debug/src/man/man1/qyua.1 diff --git a/devel/debug/Makefile b/devel/debug/Makefile index 08952f769..e60a1f1f5 100644 --- a/devel/debug/Makefile +++ b/devel/debug/Makefile @@ -1,5 +1,5 @@ PLUGIN_NAME= debug -PLUGIN_VERSION= 1.7.d +PLUGIN_VERSION= 1.7 PLUGIN_COMMENT= Debugging Tools PLUGIN_DEPENDS= php${PLUGIN_PHP}-pear-PHP_CodeSniffer \ php${PLUGIN_PHP}-pecl-xdebug \ diff --git a/devel/debug/src/sbin/qyua b/devel/debug/src/bin/qyua similarity index 98% rename from devel/debug/src/sbin/qyua rename to devel/debug/src/bin/qyua index 77f50354f..70da97da2 100755 --- a/devel/debug/src/sbin/qyua +++ b/devel/debug/src/bin/qyua @@ -124,6 +124,7 @@ if [ -z "${TESTS}" ]; then exit 0 fi +# XXX kldload required things now as kyua is powerless (but complains) # set up a shadow config cat > ${DESTDIR}/_Kyuafile << EOF diff --git a/devel/debug/src/man/man1/qyua.1 b/devel/debug/src/man/man1/qyua.1 new file mode 100644 index 000000000..79c864168 --- /dev/null +++ b/devel/debug/src/man/man1/qyua.1 @@ -0,0 +1,99 @@ +.\" +.\" Copyright (c) 2024 Franco Fichtner +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.Dd November 22, 2024 +.Dt QYUA 1 +.Os +.Sh NAME +.Nm qyua +.Nd Quick kyua wrapper +.Sh SYNOPSIS +.Nm +.Op Fl abdlrV +.Op Ar test ... +.Sh DESCRIPTION +The +.Nm +utility is a thin wrapper around +.Xr kyua 1 +in order to run test cases directly from the source tree at +.Pa /usr/src . +In order to do this, +the +.Pa /usr/tests +directory is required, +which is provided by the +.Li tests +set of +.Xr opnsense-update 8 . +The source tree can be installed using +.Xr opnsense-code 8 . +Internally, +.Xr kyua-test 1 +is used to run the given tests. +.Pp +Please note that +.Nm +is only concerned with a single test component, namely +.Pa sys/netpfil/pf . +The focus is the ability to assist with writing tests where +they are being committed/published in the first place without +the need to compile/install anything. +.Pp +The options are as follows: +.Bl -tag -width ".Fl a" -offset indent +.It Fl a +Select all available tests to run. +.It Fl b +Bootstrap mode installs the matching tests set. +.It Fl d +In debug mode, a single test case is selected from the specified +test file using +.Sq Ar file:name . +Internally, this invokes +.Xr kyua-debug 1 +instead. +.It Fl l +List all the tests that can be run. +.It Fl r +In reference mode, run the tests available in +.Pa /usr/tests . +This works without +.Pa /usr/src +being available, but is not the default mode. +.It Fl V +Set debug mode for shell script output. +.El +.Sh EXIT STATUS +.Ex -std +.Sh SEE ALSO +.Xr kyua 1 , +.Xr kyua-debug 1 , +.Xr kyua-test 1 , +.Xr opnsense-code 8 , +.Xr opnsense-update 8 +.Sh AUTHORS +.An Franco Fichtner Aq Mt franco@opnsense.org