tests/ci: fix missing /usr/local/{sbin,bin} in freebsdci rc PATH

Currently, a lot of tests report 'skipped' due to missing binaries
in the PATH. The real issue is that /etc/rc forcibly restricts the
PATH to the base system only.

This patch re-enables a large chunk of skipped tests by adding
the missing LOCALBASE directories to the PATH so that Kyua can
discover third-party packages. It also fixes some minor rc scripting
style as per the official freebsd scripting guide[0].

[0] https://docs.freebsd.org/en/articles/rc-scripting

Signed-off-by: Siva Mahadevan <me@svmhdvn.name>
Sponsored by: The FreeBSD Foundation
Approved by:	lwhsu
Differential Revision:	https://reviews.freebsd.org/D51303
This commit is contained in:
Siva Mahadevan
2025-07-16 22:15:33 +02:00
committed by Muhammad Moinur Rahman
parent 55f80afa17
commit 57f725a6a6
+5 -4
View File
@@ -25,9 +25,6 @@
. /etc/rc.subr
: ${freebsdci_enable:="NO"}
: ${freebsdci_type:="full"}
name="freebsdci"
desc="Run FreeBSD CI"
rcvar=freebsdci_enable
@@ -39,6 +36,11 @@ tardev=/dev/vtbd1
metadir=/meta
istar=$(file -s ${tardev} | grep "POSIX tar archive" | wc -l)
load_rc_config $name
: ${freebsdci_enable:="NO"}
: ${freebsdci_type:="full"}
PATH="${PATH}:/usr/local/sbin:/usr/local/bin"
auto_shutdown()
{
# NOTE: Currently RISC-V kernels lack the ability to
@@ -105,5 +107,4 @@ firstboot_ci_run()
auto_shutdown
}
load_rc_config $name
run_rc_command "$1"