From 955306a03fdc52981bd8512c1cf43f5415da57bb Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Wed, 13 Nov 2024 08:29:14 +0100 Subject: [PATCH] debug/devel: fix scapy prefix and pivot to atf port --- devel/debug/Makefile | 3 ++- devel/debug/src/sbin/opnsense-atf | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/devel/debug/Makefile b/devel/debug/Makefile index 8e7336c0c..6d79424ce 100644 --- a/devel/debug/Makefile +++ b/devel/debug/Makefile @@ -5,7 +5,8 @@ PLUGIN_DEPENDS= php${PLUGIN_PHP}-pear-PHP_CodeSniffer \ php${PLUGIN_PHP}-pecl-xdebug \ phpunit9-php${PLUGIN_PHP} \ py${PLUGIN_PYTHON}-pycodestyle \ - p5-File-Slurp git jq scapy + py${PLUGIN_PYTHON}-scapy \ + p5-File-Slurp atf git jq PLUGIN_MAINTAINER= franco@opnsense.org PLUGIN_TIER= 2 diff --git a/devel/debug/src/sbin/opnsense-atf b/devel/debug/src/sbin/opnsense-atf index a0cb9dae8..c0cc515fb 100755 --- a/devel/debug/src/sbin/opnsense-atf +++ b/devel/debug/src/sbin/opnsense-atf @@ -23,6 +23,7 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. +ATFCMD=/usr/local/bin/atf-sh PATTERNS="-e ^passed -e ^skipped -e ^failed" TESTDIR=/usr/src/tests/sys/netpfil/pf __RUNNING_INSIDE_ATF_RUN=internal-yes-value @@ -94,9 +95,9 @@ run() if [ -n "${TESTCASE}" -a "${TESTCASE}" != "${CASE}" ]; then continue fi - RESULT=$( (/usr/libexec/atf-sh ${TEST} ${CASE} 2>&1) | grep ${PATTERNS}) + RESULT=$( (${ATFCMD} ${TEST} ${CASE} 2>&1) | grep ${PATTERNS}) if [ -n "${CLEANUP}" ]; then - /usr/libexec/atf-sh ${TEST} ${CASE}:cleanup > /dev/null 2>&1 + ${ATFCMD} ${TEST} ${CASE}:cleanup > /dev/null 2>&1 fi if [ -z "${DO_DEBUG}" ]; then echo ">>> $(basename ${TESTDIR})(${TESTFILE}:${CASE}): ${RESULT}" @@ -117,8 +118,8 @@ if [ -n "${DO_ALL}" ]; then fi # We could consider copying the whole test setup -# somewhere else # but the whole thing needs to -# be redesigned anyway. Fudge this locally. +# somewhere else but the whole thing needs to be +# redesigned anyway. Fudge this locally. chmod 555 ${TESTDIR}/../common/*.sh ${TESTDIR}/../common/*.py ${TESTDIR}/*.py for TEST in ${TESTS}; do