summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2015-10-08 19:10:51 +0000
committerbdrewery <bdrewery@FreeBSD.org>2015-10-08 19:10:51 +0000
commit324678801ac2def39969a3ef835218e611ea3f5e (patch)
treee38e373ee8c0a2b2f52bd86c9af0aa68710ce7c7 /share
parentfd64b90b59a1f489d182f64848c555e0f47d5a3f (diff)
downloadFreeBSD-src-324678801ac2def39969a3ef835218e611ea3f5e.zip
FreeBSD-src-324678801ac2def39969a3ef835218e611ea3f5e.tar.gz
Direct commit to fix usage with fmake.
fmake does not have :tW, so use some clever :Q tricks to achieve the same result. This won't work if PATH actually contains spaces, but it's better than not working at all.
Diffstat (limited to 'share')
-rw-r--r--share/mk/bsd.test.mk8
-rw-r--r--share/mk/suite.test.mk5
2 files changed, 13 insertions, 0 deletions
diff --git a/share/mk/bsd.test.mk b/share/mk/bsd.test.mk
index e0e9fe6..2dfa83a 100644
--- a/share/mk/bsd.test.mk
+++ b/share/mk/bsd.test.mk
@@ -43,11 +43,19 @@ DISTRIBUTION:= tests
# Ordered list of directories to construct the PATH for the tests.
TESTS_PATH+= ${DESTDIR}/bin ${DESTDIR}/sbin \
${DESTDIR}/usr/bin ${DESTDIR}/usr/sbin
+.if defined(.PARSEDIR)
TESTS_ENV+= PATH=${TESTS_PATH:tW:C/ +/:/g}
+.else
+TESTS_ENV+= PATH=${TESTS_PATH:N :Q:S,\\ ,:,g}
+.endif
# Ordered list of directories to construct the LD_LIBRARY_PATH for the tests.
TESTS_LD_LIBRARY_PATH+= ${DESTDIR}/lib ${DESTDIR}/usr/lib
+.if defined(.PARSEDIR)
TESTS_ENV+= LD_LIBRARY_PATH=${TESTS_LD_LIBRARY_PATH:tW:C/ +/:/g}
+.else
+TESTS_ENV+= LD_LIBRARY_PATH=${TESTS_LD_LIBRARY_PATH:N :Q:S,\\ ,:,g}
+.endif
# List of all tests being built. The various *.test.mk modules extend this
# variable as needed.
diff --git a/share/mk/suite.test.mk b/share/mk/suite.test.mk
index 5e1504c..fd421fc 100644
--- a/share/mk/suite.test.mk
+++ b/share/mk/suite.test.mk
@@ -72,8 +72,13 @@ Kyuafile.auto: Makefile
echo; \
} >Kyuafile.auto.tmp
.for _T in ${_TESTS}
+.if defined(.PARSEDIR)
@echo '${TEST_INTERFACE.${_T}}_test_program{name="${_T}"${TEST_METADATA.${_T}:C/$/,/:tW:C/^/, /W:C/,$//W}}' \
>>Kyuafile.auto.tmp
+.else
+ @echo '${TEST_INTERFACE.${_T}}_test_program{name="${_T}"${TEST_METADATA.${_T}:C/^/, /:Q:S/\\ ,/,/g:S,\\,,g}}' \
+ >>Kyuafile.auto.tmp
+.endif
.endfor
.for _T in ${TESTS_SUBDIRS:N.WAIT}
@echo "include(\"${_T}/Kyuafile\")" >>Kyuafile.auto.tmp
OpenPOWER on IntegriCloud