1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-29 05:38:00 +00:00

Mk/Uses/cmake.mk: use proper environment in do-test

* the actual test run used MAKE_ENV but should use TEST_ENV
* also, ctest(1) defaults to running tests serially, so add
  CTEST_PARALLEL_LEVEL here and set it to _MAKE_JOBS_NUMBER.
  NOTE: cmake 3.29 changes semantics for _MAKE_JOBS_NUMBER empty or 0.

This was developed together with diizzy@ as a result of analysing
performance regressions from PR 278500.

PR:		278533
Approved by:	portmgr@ (tcberner@)
This commit is contained in:
Matthias Andree 2024-04-22 20:51:41 +02:00
parent 7c9c1acf45
commit cbee39bcd1

View File

@ -192,7 +192,7 @@ do-test:
@cd ${BUILD_WRKSRC} && \
${SETENVI} ${WRK_ENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} ${CMAKE_TESTING_ARGS} ${CMAKE_SOURCE_PATH} && \
${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE_CMD} ${_MAKE_JOBS} ${MAKE_ARGS} ${ALL_TARGET} && \
${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${CMAKE_TESTING_TARGET}
${SETENVI} ${WRK_ENV} ${TEST_ENV} CTEST_PARALLEL_LEVEL=${_MAKE_JOBS_NUMBER} ${MAKE_CMD} ${MAKE_ARGS} ${CMAKE_TESTING_TARGET}
. endif
. endif