The branch main has been updated by kevans:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=986deea5b518ee5bf6b8b1486056a21819bd8bd2

commit 986deea5b518ee5bf6b8b1486056a21819bd8bd2
Author:     Kyle Evans <kev...@freebsd.org>
AuthorDate: 2021-01-14 06:34:29 +0000
Commit:     Kyle Evans <kev...@freebsd.org>
CommitDate: 2021-01-14 06:37:48 +0000

    build: `make check`: use a PATH search instead for Kyua
    
    which(1) accepts both relative/absolute paths as well as lone binary
    names.  Set KYUA to kyua and use which(1) to confirm that it can find one;
    if it cannot, just advise the user to set KYUA directly to the kyua binary
    rather than assuming a relative location from LOCALBASE.
    
    This allows `make check` to be operated with the version of kyua in base
    without losing the flexibility of specifying another one.
    
    ngie@ notes that the original intention was to avoid redundant $PATH lookups
    and improve the determinism of the target. A future change will likely push
    us back to this state, perhaps in the form of reverting this entirely and
    just switching to using kyua in base. Accepting any in $PATH should be
    considered a transitional move, at least until it's declared otherwise,
    since kyua was only semi-recently added to base.
    
    Reviewed-by:    brooks, emaste, lwhsu, ngie
    Differential-Revision:  https://reviews.freebsd.org/D28045
---
 share/mk/suite.test.mk | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/share/mk/suite.test.mk b/share/mk/suite.test.mk
index 69cd02d684de..e772ccd1b292 100644
--- a/share/mk/suite.test.mk
+++ b/share/mk/suite.test.mk
@@ -77,7 +77,7 @@ Kyuafile: Makefile
        @mv ${.TARGET}.tmp ${.TARGET}
 .endif
 
-KYUA= ${LOCALBASE}/bin/kyua
+KYUA?= kyua
 
 # Definition of the "make check" target and supporting variables.
 #
@@ -90,13 +90,13 @@ KYUA= ${LOCALBASE}/bin/kyua
 # report bogus results unless the new binaries are put in place.
 
 realcheck: .PHONY
-       @if [ ! -x ${KYUA} ]; then \
+       if ! which -s "${KYUA}"; then \
                echo; \
                echo "kyua binary not installed at expected location 
(${.TARGET})"; \
                echo; \
                echo "Please install via pkg install, or specify the path to 
the kyua"; \
-               echo "package via the \$${LOCALBASE} variable, e.g. "; \
-               echo "LOCALBASE=\"${LOCALBASE}\""; \
+               echo "binary via the \$${KYUA} variable, e.g., "; \
+               echo "KYUA=\"${LOCALBASE}/bin/kyua\""; \
                false; \
        fi
        @env ${TESTS_ENV:Q} ${KYUA} test -k ${DESTDIR}${TESTSDIR}/Kyuafile
_______________________________________________
dev-commits-src-main@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main
To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"

Reply via email to