git: 57f725a6a6c1 - main - tests/ci: fix missing /usr/local/{sbin,bin} in freebsdci rc PATH
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 16 Jul 2025 20:17:24 UTC
The branch main has been updated by bofh:
URL: https://cgit.FreeBSD.org/src/commit/?id=57f725a6a6c19b12015854589764babe58252155
commit 57f725a6a6c19b12015854589764babe58252155
Author: Siva Mahadevan <me@svmhdvn.name>
AuthorDate: 2025-07-16 20:15:33 +0000
Commit: Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2025-07-16 20:17:09 +0000
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
---
tests/ci/tools/freebsdci | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/tests/ci/tools/freebsdci b/tests/ci/tools/freebsdci
index 7b4ce9669ab2..51bd19e2967d 100755
--- a/tests/ci/tools/freebsdci
+++ b/tests/ci/tools/freebsdci
@@ -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"