Files
ladybird/Tests/LibWeb/test-web/CMakeLists.txt
Timothy Flynn 6d52c9003c test-web: Add an explicit verbosity mode to disable live display
We were previously using the absence of a results directory to decide
if we should disable live display. However, this was never the case -
the results directory would become unconditionally set in main(). This
caused all test-web output in CI to become hidden.

Instead, let's add a verbosity mode to display test output explicitly.
This is set for CI.

This also makes it much easier to debug single tests locally. The live
capture and results file combo is a bit overkill for running a single
test; we can now just add "-v" to the command line to see the output
directly in the terminal.
2026-01-20 14:14:38 -05:00

39 lines
1.2 KiB
CMake

set(SOURCES
Application.cpp
Fixture.cpp
Fuzzy.cpp
TestWebView.cpp
main.cpp
)
add_executable(test-web ${SOURCES})
add_dependencies(test-web ladybird_build_resource_files ImageDecoder RequestServer WebContent WebWorker)
target_link_libraries(test-web PRIVATE AK LibCore LibDiff LibFileSystem LibGfx LibImageDecoderClient LibIPC LibJS LibMain LibRequests LibURL LibWeb LibWebView)
if (APPLE)
target_compile_definitions(test-web PRIVATE LADYBIRD_BINARY_PATH="$<TARGET_FILE_DIR:ladybird>")
elseif (WIN32)
target_link_libraries(test-web PRIVATE LibDevTools)
find_package(pthread REQUIRED)
target_include_directories(test-web PRIVATE $<BUILD_INTERFACE:${PTHREAD_INCLUDE_DIR}>)
lagom_windows_bin(test-web CONSOLE)
endif()
# FIXME: Add support for running test-web on Windows
if (WIN32)
return()
endif()
if (BUILD_TESTING)
find_package(Python3 REQUIRED)
add_test(
NAME LibWeb
COMMAND $<TARGET_FILE:test-web> --python-executable ${Python3_EXECUTABLE} --dump-failed-ref-tests --per-test-timeout 120 -v -v
)
set_tests_properties(LibWeb PROPERTIES
ENVIRONMENT LADYBIRD_SOURCE_DIR=${LADYBIRD_PROJECT_ROOT}
TIMEOUT_SIGNAL_NAME SIGTERM)
endif()