Tests: Pass App Bundle path to WebDriver to WPT CTest test on macOS

The WebDriver binary in ${CMAKE_CURRENT_BINARY_DIR}/bin doesn't actually
have access to the Ladybird binary in the default CMake setup.
This commit is contained in:
Andrew Kaster 2024-02-07 09:10:52 -07:00 committed by Andreas Kling
parent d7f04c9aa1
commit f739e976a4
Notes: sideshowbarker 2024-07-16 19:57:55 +09:00
2 changed files with 7 additions and 2 deletions

View file

@ -269,4 +269,9 @@ if (BUILD_TESTING)
ENVIRONMENT QT_QPA_PLATFORM=offscreen
ENVIRONMENT "SERENITY_SOURCE_DIR=${SERENITY_SOURCE_DIR}"
)
if (APPLE)
set_tests_properties(LibWeb WPT PROPERTIES
ENVIRONMENT "WEBDRIVER_BINARY=$<TARGET_FILE_DIR:ladybird>/$<TARGET_FILE_NAME:WebDriver>"
)
endif()
endif()

View file

@ -11,8 +11,8 @@ then
fi
WEBDRIVER_BINARY=$(env PATH="${SERENITY_SOURCE_DIR}/Build/lagom/bin:${SERENITY_SOURCE_DIR}/Meta/Lagom/Build/bin:${PATH}" \
which WebDriver)
: "${WEBDRIVER_BINARY:=$(env PATH="${SERENITY_SOURCE_DIR}/Build/lagom/bin:${SERENITY_SOURCE_DIR}/Meta/Lagom/Build/bin:${PATH}" \
which WebDriver)}"
update_expectations_metadata=false
for arg in "$@"; do