Truly independent web browser
Meta: Add a shared helper for Python tests
Timothy Flynn5ccbce2d096e
diff --git a/Meta/CMake/targets.cmake b/Meta/CMake/targets.cmakeindex 282a2f8d7df..cb712a06ca0 100644--- a/Meta/CMake/targets.cmake+++ b/Meta/CMake/targets.cmake@@ -205,6 +205,28 @@ function(ladybird_test test_src sub_dir)endif()endfunction()+function(ladybird_python_test test_src)+ cmake_parse_arguments(PARSE_ARGV 1 LADYBIRD_TEST "" "NAME;TIMEOUT" "ARGS;ENVIRONMENT")+ if (NOT LADYBIRD_TEST_NAME)+ get_filename_component(LADYBIRD_TEST_NAME ${test_src} NAME_WE)+ endif()+ if (NOT DEFINED LADYBIRD_TEST_TIMEOUT)+ set(LADYBIRD_TEST_TIMEOUT 120)+ endif()+ list(PREPEND LADYBIRD_TEST_ENVIRONMENT "LADYBIRD_SOURCE_DIR=${LADYBIRD_SOURCE_DIR}")++ get_filename_component(test_src "${test_src}" ABSOLUTE BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")++ add_test(+ NAME ${LADYBIRD_TEST_NAME}+ COMMAND ${Python3_EXECUTABLE} "${test_src}" ${LADYBIRD_TEST_ARGS}+ )+ set_tests_properties(${LADYBIRD_TEST_NAME} PROPERTIES+ TIMEOUT "${LADYBIRD_TEST_TIMEOUT}"+ ENVIRONMENT "${LADYBIRD_TEST_ENVIRONMENT}"+ )+endfunction()+# Each library's sources are added directly to its test executable.function(ladybird_test_suite sub_dir)string(REPLACE "/" "" suite_name "Test${sub_dir}")diff --git a/Tests/LibWeb/CMakeLists.txt b/Tests/LibWeb/CMakeLists.txtindex 9a25df809a5..8689d4a9860 100644--- a/Tests/LibWeb/CMakeLists.txt+++ b/Tests/LibWeb/CMakeLists.txt@@ -1,11 +1,7 @@add_subdirectory("test-web")if (BUILD_TESTING AND NOT WIN32)- add_test(- NAME TestWebDriverHTTPErrorResponses- COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-webdriver-http-error-responses.py $<TARGET_FILE:WebDriver>- )- set_tests_properties(TestWebDriverHTTPErrorResponses PROPERTIES TIMEOUT 120)+ ladybird_python_test(test-webdriver-http-error-responses.py ARGS $<TARGET_FILE:WebDriver>)endif()if (BUILD_BROWSER_TESTS_ONLY)@@ -87,15 +83,14 @@ target_link_libraries(TestLibWeb PRIVATE LibCompositing LibCrypto LibGC LibGfx L# The check reads the symbols of the build's objects with nm, which can't see into an LTO build's bitcode objects and# isn't the toolchain's symbol reader on Windows.if (BUILD_TESTING AND NOT WIN32 AND NOT CMAKE_INTERPROCEDURAL_OPTIMIZATION)- add_test(+ ladybird_python_test("${LADYBIRD_SOURCE_DIR}/Meta/check-dead-rust-exports.py"NAME TestDeadRustExports- COMMAND ${Python3_EXECUTABLE} ${LADYBIRD_SOURCE_DIR}/Meta/check-dead-rust-exports.py+ ARGS--nm ${CMAKE_NM}--compile-commands ${CMAKE_BINARY_DIR}/compile_commands.json--source-root ${LADYBIRD_SOURCE_DIR}$<TARGET_FILE:libweb_bindings_rust>- $<TARGET_FILE:libweb_content_blocker_rust>- )+ $<TARGET_FILE:libweb_content_blocker_rust>)endif()diff --git a/Tests/LibWeb/test-web/CMakeLists.txt b/Tests/LibWeb/test-web/CMakeLists.txtindex 49e7561859c..3e899ad2461 100644--- a/Tests/LibWeb/test-web/CMakeLists.txt+++ b/Tests/LibWeb/test-web/CMakeLists.txt@@ -26,19 +26,8 @@ elseif (WIN32)endif()if (BUILD_TESTING)- add_test(- NAME LibWebManualRenderingReset- COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-manual-rendering-reset.py- $<TARGET_FILE:test-web> ${LADYBIRD_SOURCE_DIR}- )- set_tests_properties(LibWebManualRenderingReset PROPERTIES TIMEOUT 240)-- add_test(- NAME LibWebHistoryRateLimitReset- COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-history-rate-limit-reset.py- $<TARGET_FILE:test-web> ${LADYBIRD_SOURCE_DIR}- )- set_tests_properties(LibWebHistoryRateLimitReset PROPERTIES TIMEOUT 120)+ ladybird_python_test(test-history-rate-limit-reset.py ARGS $<TARGET_FILE:test-web>)+ ladybird_python_test(test-manual-rendering-reset.py ARGS $<TARGET_FILE:test-web> TIMEOUT 240)add_test(NAME LibWebdiff --git a/Tests/LibWeb/test-web/test-history-rate-limit-reset.py b/Tests/LibWeb/test-web/test-history-rate-limit-reset.pyindex c9a32c1c8ac..f707cb62374 100644--- a/Tests/LibWeb/test-web/test-history-rate-limit-reset.py+++ b/Tests/LibWeb/test-web/test-history-rate-limit-reset.py@@ -18,9 +18,8 @@ from pathlib import Pathdef main():parser = argparse.ArgumentParser()parser.add_argument("test_web", type=Path)- parser.add_argument("source", type=Path)args = parser.parse_args()- source = args.source.resolve()+ source = Path(os.environ["LADYBIRD_SOURCE_DIR"]).resolve()with tempfile.TemporaryDirectory(prefix="test-web-history-rate-limit-reset-") as temporary:root = Path(temporary)@@ -66,7 +65,6 @@ def main():results = root / "results"env = os.environ.copy()- env["LADYBIRD_SOURCE_DIR"] = str(source)# The echo server imports its vendored tools even though these fixtures use only file URLs. Keep those tools# outside the private input tree so test discovery cannot collect their own HTML fixtures.wpt = source / "Tests/LibWeb/Text/input/wpt-import"diff --git a/Tests/LibWeb/test-web/test-manual-rendering-reset.py b/Tests/LibWeb/test-web/test-manual-rendering-reset.pyindex a8008ac3dde..1f822c6ae37 100644--- a/Tests/LibWeb/test-web/test-manual-rendering-reset.py+++ b/Tests/LibWeb/test-web/test-manual-rendering-reset.py@@ -48,7 +48,6 @@ def run_case(binary, source, root, name, manual, timeout):(root / "Ref/expected/green.html").write_text("<!doctype html><style>html,body{margin:0;background:green}</style>")results = root / "results"env = os.environ.copy()- env["LADYBIRD_SOURCE_DIR"] = str(source)# The echo server imports its vendored tools even though these fixtures use only file URLs. Keep those tools# outside the private input tree so test discovery cannot collect their own HTML fixtures.wpt = source / "Tests/LibWeb/Text/input/wpt-import"@@ -91,13 +90,13 @@ def run_case(binary, source, root, name, manual, timeout):def main():parser = argparse.ArgumentParser()parser.add_argument("test_web", type=Path)- parser.add_argument("source", type=Path)args = parser.parse_args()+ source = Path(os.environ["LADYBIRD_SOURCE_DIR"]).resolve()with tempfile.TemporaryDirectory(prefix="test-web-manual-reset-") as temporary:root = Path(temporary)- run_case(args.test_web.resolve(), args.source.resolve(), root, "control", False, False)- run_case(args.test_web.resolve(), args.source.resolve(), root, "normal-completion", True, False)- run_case(args.test_web.resolve(), args.source.resolve(), root, "timeout", True, True)+ run_case(args.test_web.resolve(), source, root, "control", False, False)+ run_case(args.test_web.resolve(), source, root, "normal-completion", True, False)+ run_case(args.test_web.resolve(), source, root, "timeout", True, True)if __name__ == "__main__":diff --git a/Tests/LibWebView/CMakeLists.txt b/Tests/LibWebView/CMakeLists.txtindex 5e3c1efd47f..1de5828f966 100644--- a/Tests/LibWebView/CMakeLists.txt+++ b/Tests/LibWebView/CMakeLists.txt@@ -1,165 +1,45 @@if (BUILD_TESTING AND NOT WIN32)if (APPLE OR LINUX)- add_test(- NAME TestWebDriverCrashReport- COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-webdriver-crash-report.py $<TARGET_FILE:WebDriver>- )- set_tests_properties(TestWebDriverCrashReport PROPERTIES TIMEOUT 120)- add_test(- NAME TestWebDriverBrowserCrashRecovery- COMMAND ${Python3_EXECUTABLE}- ${CMAKE_CURRENT_SOURCE_DIR}/test-webdriver-browser-crash-recovery.py- $<TARGET_FILE:WebDriver>- )- set_tests_properties(TestWebDriverBrowserCrashRecovery PROPERTIES TIMEOUT 120)- set(crash_report_helpers WebWorker RequestServer ImageDecoder Compositor)- foreach(helper IN LISTS crash_report_helpers)- add_test(+ ladybird_python_test(test-bytecode-cache-blob-is-file-backed.py ARGS $<TARGET_FILE:WebDriver>)+ ladybird_python_test(test-devtools-catch-up-layout.py ARGS $<TARGET_FILE:ladybird>)+ ladybird_python_test(test-devtools-client-follows-the-tab.py ARGS $<TARGET_FILE:ladybird>)+ ladybird_python_test(test-iframe-console.py ARGS $<TARGET_FILE:ladybird>)+ ladybird_python_test(test-message-port-collection.py ARGS $<TARGET_FILE:WebDriver>)+ ladybird_python_test(test-shared-stylesheet-memory.py ARGS $<TARGET_FILE:WebDriver> TIMEOUT 180)+ ladybird_python_test(test-user-agent-preset-reaches-child-frames.py ARGS $<TARGET_FILE:ladybird>)+ ladybird_python_test(test-webdriver-browser-crash-recovery.py ARGS $<TARGET_FILE:WebDriver>)+ ladybird_python_test(test-webdriver-compositor-reconnect.py ARGS $<TARGET_FILE:WebDriver>)+ ladybird_python_test(test-webdriver-crash-report.py ARGS $<TARGET_FILE:WebDriver>)+ ladybird_python_test(test-webdriver-worker-terminated-while-starting.py ARGS $<TARGET_FILE:WebDriver>)+ ladybird_python_test(test-window-size-reaches-every-page.py ARGS $<TARGET_FILE:ladybird>)+ ladybird_python_test(test-worker-error-console.py ARGS $<TARGET_FILE:ladybird>)++ foreach(helper IN ITEMS Compositor ImageDecoder RequestServer WebWorker)+ ladybird_python_test(test-webdriver-crash-report.pyNAME Test${helper}CrashReport- COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-webdriver-crash-report.py $<TARGET_FILE:WebDriver> --process ${helper}+ ARGS $<TARGET_FILE:WebDriver> --process ${helper})- set_tests_properties(Test${helper}CrashReport PROPERTIES TIMEOUT 120)endforeach()- add_test(- NAME TestWebDriverWorkerTerminatedWhileStarting- COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-webdriver-worker-terminated-while-starting.py $<TARGET_FILE:WebDriver>- )- set_tests_properties(TestWebDriverWorkerTerminatedWhileStarting PROPERTIES TIMEOUT 120)- add_test(- NAME TestWebDriverCompositorReconnect- COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-webdriver-compositor-reconnect.py $<TARGET_FILE:WebDriver>- )- set_tests_properties(TestWebDriverCompositorReconnect PROPERTIES TIMEOUT 120)- add_test(- NAME TestDevToolsClientFollowsTheTab- COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-devtools-client-follows-the-tab.py $<TARGET_FILE:ladybird>- )- set_tests_properties(TestDevToolsClientFollowsTheTab PROPERTIES TIMEOUT 120)- add_test(- NAME TestDevToolsCatchUpLayout- COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-devtools-catch-up-layout.py $<TARGET_FILE:ladybird>- )- set_tests_properties(TestDevToolsCatchUpLayout PROPERTIES TIMEOUT 120)- add_test(- NAME TestWorkerErrorConsole- COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-worker-error-console.py $<TARGET_FILE:ladybird>- )- set_tests_properties(TestWorkerErrorConsole PROPERTIES TIMEOUT 120)- add_test(- NAME TestIframeConsole- COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-iframe-console.py $<TARGET_FILE:ladybird>- )- set_tests_properties(TestIframeConsole PROPERTIES TIMEOUT 120)- add_test(- NAME TestWindowSizeReachesEveryPage- COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-window-size-reaches-every-page.py $<TARGET_FILE:ladybird>- )- set_tests_properties(TestWindowSizeReachesEveryPage PROPERTIES TIMEOUT 120)- add_test(- NAME TestUserAgentPresetReachesChildFrames- COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-user-agent-preset-reaches-child-frames.py $<TARGET_FILE:ladybird>- )- set_tests_properties(TestUserAgentPresetReachesChildFrames PROPERTIES TIMEOUT 120)- add_test(- NAME TestMessagePortCollection- COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-message-port-collection.py $<TARGET_FILE:WebDriver>- )- set_tests_properties(TestMessagePortCollection PROPERTIES TIMEOUT 120)- add_test(- NAME TestSharedStyleSheetMemory- COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-shared-stylesheet-memory.py $<TARGET_FILE:WebDriver>- )- set_tests_properties(TestSharedStyleSheetMemory PROPERTIES TIMEOUT 180)- add_test(- NAME TestBytecodeCacheBlobIsFileBacked- COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-bytecode-cache-blob-is-file-backed.py $<TARGET_FILE:WebDriver>- )- set_tests_properties(TestBytecodeCacheBlobIsFileBacked PROPERTIES TIMEOUT 120)endif()- add_test(- NAME TestWebDriverDeleteSession- COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-webdriver-delete-session.py $<TARGET_FILE:WebDriver>+ ladybird_python_test(test-webdriver-bidi.py ARGS $<TARGET_FILE:WebDriver>)+ ladybird_python_test(test-webdriver-content-blockers.py ARGS $<TARGET_FILE:WebDriver> TIMEOUT 180)+ ladybird_python_test(test-webdriver-delete-session.py ARGS $<TARGET_FILE:WebDriver>)+ ladybird_python_test(test-webdriver-error-keep-alive.py ARGS $<TARGET_FILE:WebDriver>)+ ladybird_python_test(test-webdriver-force-dark.py ARGS $<TARGET_FILE:WebDriver>)+ ladybird_python_test(test-webdriver-location-policy.py ARGS $<TARGET_FILE:WebDriver>)+ ladybird_python_test(test-webdriver-notifications-policy.py ARGS $<TARGET_FILE:WebDriver>)+ ladybird_python_test(test-webdriver-permissions-settings.py ARGS $<TARGET_FILE:WebDriver>)+ ladybird_python_test(test-webdriver-search-engine-settings.py ARGS $<TARGET_FILE:WebDriver>)+ ladybird_python_test(test-webdriver-set-permission.py ARGS $<TARGET_FILE:WebDriver>)+ ladybird_python_test(test-webdriver-settings-changes.py ARGS $<TARGET_FILE:WebDriver>)+ ladybird_python_test(test-webdriver-site-zoom.py ARGS $<TARGET_FILE:WebDriver>)+ ladybird_python_test(test-webdriver-web-ui-pages-share-a-process.py ARGS $<TARGET_FILE:WebDriver>)++ ladybird_python_test(test-webdriver-session-history.py+ ARGS $<TARGET_FILE:WebDriver>+ ENVIRONMENT "XDG_DATA_HOME=${CMAKE_CURRENT_BINARY_DIR}/session-history-data")- set_tests_properties(TestWebDriverDeleteSession PROPERTIES TIMEOUT 120)-- add_test(- NAME TestWebDriverContentBlockers- COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-webdriver-content-blockers.py $<TARGET_FILE:WebDriver>- )- set_tests_properties(TestWebDriverContentBlockers PROPERTIES TIMEOUT 180)-- add_test(- NAME TestWebDriverLocationPolicy- COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-webdriver-location-policy.py $<TARGET_FILE:WebDriver>- )- set_tests_properties(TestWebDriverLocationPolicy PROPERTIES TIMEOUT 120)-- add_test(- NAME TestWebDriverNotificationsPolicy- COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-webdriver-notifications-policy.py $<TARGET_FILE:WebDriver>- )- set_tests_properties(TestWebDriverNotificationsPolicy PROPERTIES TIMEOUT 120)-- add_test(- NAME TestWebDriverPermissionsSettings- COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-webdriver-permissions-settings.py $<TARGET_FILE:WebDriver>- )- set_tests_properties(TestWebDriverPermissionsSettings PROPERTIES TIMEOUT 120)-- add_test(- NAME TestWebDriverSetPermission- COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-webdriver-set-permission.py $<TARGET_FILE:WebDriver>- )- set_tests_properties(TestWebDriverSetPermission PROPERTIES TIMEOUT 120)-- add_test(- NAME TestWebDriverSearchEngineSettings- COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-webdriver-search-engine-settings.py $<TARGET_FILE:WebDriver>- )- set_tests_properties(TestWebDriverSearchEngineSettings PROPERTIES TIMEOUT 120)-- add_test(- NAME TestWebDriverSettingsChanges- COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-webdriver-settings-changes.py $<TARGET_FILE:WebDriver>- )- set_tests_properties(TestWebDriverSettingsChanges PROPERTIES TIMEOUT 120)-- add_test(- NAME TestWebDriverWebUIPagesShareAProcess- COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-webdriver-web-ui-pages-share-a-process.py $<TARGET_FILE:WebDriver>- )- set_tests_properties(TestWebDriverWebUIPagesShareAProcess PROPERTIES TIMEOUT 120)-- add_test(- NAME TestWebDriverSessionHistory- COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-webdriver-session-history.py $<TARGET_FILE:WebDriver>- )- set_tests_properties(TestWebDriverSessionHistory PROPERTIES TIMEOUT 120 ENVIRONMENT "XDG_DATA_HOME=${CMAKE_CURRENT_BINARY_DIR}/session-history-data")-- add_test(- NAME TestWebDriverSiteZoom- COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-webdriver-site-zoom.py $<TARGET_FILE:WebDriver>- )- set_tests_properties(TestWebDriverSiteZoom PROPERTIES TIMEOUT 120)-- add_test(- NAME TestWebDriverForceDark- COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-webdriver-force-dark.py $<TARGET_FILE:WebDriver>- )- set_tests_properties(TestWebDriverForceDark PROPERTIES TIMEOUT 120)-- add_test(- NAME TestWebDriverBiDi- COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-webdriver-bidi.py $<TARGET_FILE:WebDriver>- )- set_tests_properties(TestWebDriverBiDi PROPERTIES TIMEOUT 120)-- add_test(- NAME TestWebDriverErrorKeepAlive- COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-webdriver-error-keep-alive.py $<TARGET_FILE:WebDriver>- )- set_tests_properties(TestWebDriverErrorKeepAlive PROPERTIES TIMEOUT 120)endif()if (BUILD_BROWSER_TESTS_ONLY)@@ -344,10 +224,6 @@ if (NOT WIN32)endif()if (BUILD_TESTING AND NOT WIN32)- add_test(NAME TestBuildInformation COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-build-information.py)- add_test(- NAME TestWebDriverBiDiCleanup- COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-webdriver-bidi-cleanup.py- )- set_tests_properties(TestWebDriverBiDiCleanup PROPERTIES TIMEOUT 30)+ ladybird_python_test(test-build-information.py)+ ladybird_python_test(test-webdriver-bidi-cleanup.py TIMEOUT 30)endif()diff --git a/Tests/Meta/CMakeLists.txt b/Tests/Meta/CMakeLists.txtindex 90cb2123a9c..a0336911f20 100644--- a/Tests/Meta/CMakeLists.txt+++ b/Tests/Meta/CMakeLists.txt@@ -1,37 +1,6 @@if (NOT WIN32)- add_custom_target(test-xctrace-time-profile ALL DEPENDS "${CMAKE_BINARY_DIR}/bin/test-xctrace-time-profile.py")- add_custom_command(- OUTPUT "${CMAKE_BINARY_DIR}/bin/test-xctrace-time-profile.py"- COMMAND "${CMAKE_COMMAND}" -E copy "${ladybird_SOURCE_DIR}/Tests/Meta/test-xctrace-time-profile.py" "${CMAKE_BINARY_DIR}/bin/test-xctrace-time-profile.py"- DEPENDS "${ladybird_SOURCE_DIR}/Tests/Meta/test-xctrace-time-profile.py"- )- add_test(NAME test-xctrace-time-profile COMMAND "${Python3_EXECUTABLE}" "${CMAKE_BINARY_DIR}/bin/test-xctrace-time-profile.py")- set_tests_properties(test-xctrace-time-profile PROPERTIES ENVIRONMENT LADYBIRD_SOURCE_DIR=${LADYBIRD_SOURCE_DIR})-- add_custom_target(test-lint-environment ALL DEPENDS "${CMAKE_BINARY_DIR}/bin/test-lint-environment.py")- add_custom_command(- OUTPUT "${CMAKE_BINARY_DIR}/bin/test-lint-environment.py"- COMMAND "${CMAKE_COMMAND}" -E copy "${ladybird_SOURCE_DIR}/Tests/Meta/test-lint-environment.py" "${CMAKE_BINARY_DIR}/bin/test-lint-environment.py"- DEPENDS "${ladybird_SOURCE_DIR}/Tests/Meta/test-lint-environment.py"- )- add_test(NAME test-lint-environment COMMAND "${Python3_EXECUTABLE}" "${CMAKE_BINARY_DIR}/bin/test-lint-environment.py")- set_tests_properties(test-lint-environment PROPERTIES ENVIRONMENT LADYBIRD_SOURCE_DIR=${LADYBIRD_SOURCE_DIR})-- add_custom_target(test-ipc-generator ALL DEPENDS "${CMAKE_BINARY_DIR}/bin/test-ipc-generator.py")- add_custom_command(- OUTPUT "${CMAKE_BINARY_DIR}/bin/test-ipc-generator.py"- COMMAND "${CMAKE_COMMAND}" -E copy "${ladybird_SOURCE_DIR}/Tests/Meta/test-ipc-generator.py" "${CMAKE_BINARY_DIR}/bin/test-ipc-generator.py"- DEPENDS "${ladybird_SOURCE_DIR}/Tests/Meta/test-ipc-generator.py"- )- add_test(NAME test-ipc-generator COMMAND "${Python3_EXECUTABLE}" "${CMAKE_BINARY_DIR}/bin/test-ipc-generator.py")- set_tests_properties(test-ipc-generator PROPERTIES ENVIRONMENT LADYBIRD_SOURCE_DIR=${LADYBIRD_SOURCE_DIR})-- add_custom_target(test-js-runner ALL DEPENDS "${CMAKE_BINARY_DIR}/bin/test-js-runner.py")- add_custom_command(- OUTPUT "${CMAKE_BINARY_DIR}/bin/test-js-runner.py"- COMMAND "${CMAKE_COMMAND}" -E copy "${ladybird_SOURCE_DIR}/Tests/Meta/test-js-runner.py" "${CMAKE_BINARY_DIR}/bin/test-js-runner.py"- DEPENDS "${ladybird_SOURCE_DIR}/Tests/Meta/test-js-runner.py"- )- add_test(NAME test-js-runner COMMAND "${Python3_EXECUTABLE}" "${CMAKE_BINARY_DIR}/bin/test-js-runner.py")- set_tests_properties(test-js-runner PROPERTIES ENVIRONMENT LADYBIRD_SOURCE_DIR=${LADYBIRD_SOURCE_DIR})+ ladybird_python_test(test-ipc-generator.py)+ ladybird_python_test(test-js-runner.py)+ ladybird_python_test(test-lint-environment.py)+ ladybird_python_test(test-xctrace-time-profile.py)endif()diff --git a/Tests/UI/Qt/CMakeLists.txt b/Tests/UI/Qt/CMakeLists.txtindex 004c85fc37d..a985efc2e14 100644--- a/Tests/UI/Qt/CMakeLists.txt+++ b/Tests/UI/Qt/CMakeLists.txt@@ -148,10 +148,8 @@ if (APPLE)LIBS LibWebCommon Qt::Widgets "-framework AppKit")foreach(mode default custom)- add_test(NAME TestNativeTextEditingBindings-${mode}- COMMAND ${Python3_EXECUTABLE}- ${CMAKE_CURRENT_SOURCE_DIR}/run-native-text-editing-tests.py- $<TARGET_FILE:TestNativeTextEditingBindings> ${mode}- )+ ladybird_python_test(run-native-text-editing-tests.py+ NAME TestNativeTextEditingBindings-${mode}+ ARGS $<TARGET_FILE:TestNativeTextEditingBindings> ${mode})endforeach()endif()