From 9ca7fe9d6c7d20f76c694d6bd1749be9479391de Mon Sep 17 00:00:00 2001 From: Ambroise Leclerc <6860842+ambroise-leclerc@users.noreply.github.com> Date: Sat, 31 Oct 2026 11:22:46 +0100 Subject: [PATCH] Build developer integration in the documented CEF commands [#434] --- AGENTS.md | 2 +- docs/CHANGELOG.md | 3 +++ docs/FRONTENDS.md | 5 +++-- test/cmake/CheckNewcomerDocs.cmake | 31 +++++++++++++++++++++++++++++- 4 files changed, 37 insertions(+), 4 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 5055146f..fc2b0033 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -59,7 +59,7 @@ ctest --test-dir build --output-on-failure --parallel 4 # of the local npm registry; the tests build the rest with wf cmake -S . -B build-cef -DCMAKE_BUILD_TYPE=Release \ -DWEBFRONT_EMBED_CEF=ON -DWEBFRONT_ENABLE_TESTING=ON -cmake --build build-cef --target webtest webfront-wf --parallel +cmake --build build-cef --target webtest developer_integration webfront-wf --parallel ctest --test-dir build-cef -L web-integration --output-on-failure --parallel 4 ``` diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 91447a20..a2b5d9a1 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -15,6 +15,9 @@ dash, and gives the command its own process group (`setsid`, or a walk of its descendants) where the shell has no job control. `docs/BUILD_TIME_STUDY.md` holds the measurements and the decisions. +- Include `developer_integration` in the documented Linux CEF build commands (#434), preparing the developer journey + and its dependent Life tests. Check the browser targets in both guides and CI with `NewcomerDocsMatchExamples`. + - Prefix WebFront's test options (#412): `WEBFRONT_ENABLE_TESTING`, `WEBFRONT_ENABLE_FUZZING`, `WEBFRONT_ENABLE_COVERAGE` and `WEBFRONT_ENABLE_SANITIZER_{ADDRESS,LEAK,UNDEFINED_BEHAVIOR,THREAD,MEMORY}` replace the unprefixed `ENABLE_*` names (still `OFF` by default). A parent project's own generic variables no longer build diff --git a/docs/FRONTENDS.md b/docs/FRONTENDS.md index c06e7b82..3bbf9fce 100644 --- a/docs/FRONTENDS.md +++ b/docs/FRONTENDS.md @@ -82,8 +82,9 @@ Registry order determines the initial cache default: the first enabled embedded - `navigation-allow-list`: permit the same top-level destination through the explicit navigation allow-list. Each runs in a separate process as `Lifecycle-`, with the registry's timeout, the -`web-integration` label and the same port lock as Jasmine. Linux CEF and WebKitGTK cases use Xvfb. Build `webtest` -to build both shared runners on a validated test platform, or build all targets to include engine-specific runners as well. Run +`web-integration` label and the same port lock as Jasmine. Linux CEF and WebKitGTK cases use Xvfb. On Linux CEF, run +`cmake --build --target webtest developer_integration webfront-wf --parallel` to prepare the complete browser suite. +For other validated test platforms, build all targets to include engine-specific runners as well. Run `ctest --test-dir -L web-integration --output-on-failure` for the complete browser suite. A missing Xvfb skips both shared suites. A new frontend inherits this coverage through its registry entry; no engine-specific lifecycle runner is required. diff --git a/test/cmake/CheckNewcomerDocs.cmake b/test/cmake/CheckNewcomerDocs.cmake index 9ab1df07..997882df 100644 --- a/test/cmake/CheckNewcomerDocs.cmake +++ b/test/cmake/CheckNewcomerDocs.cmake @@ -1,4 +1,4 @@ -# Keep the two public examples, README commands and frontend option reference in sync. +# Keep the public examples, contributor commands and frontend option reference in sync. cmake_minimum_required(VERSION 3.31) if(NOT ROOT) message(FATAL_ERROR "ROOT must point at the WebFront checkout") @@ -114,6 +114,35 @@ endforeach() foreach(text readme agents) _require("${${text}}" "ctest --test-dir build --output-on-failure --parallel 4" "${text} test command") endforeach() +# The Linux label needs the developer journey as well as Jasmine and the wf driver. +# webtest builds the other browser executables through its dependencies; fixtures build the generated applications. +# Inspect only the executable run line of the CEF job's browser build step. +set(ci_browser_build "") +set(in_browser_job FALSE) +set(in_browser_step FALSE) +file(STRINGS "${ROOT}/.github/workflows/BuildAndTest.yml" ci_lines ENCODING UTF-8) +foreach(line IN LISTS ci_lines) + if(line MATCHES "^ [A-Za-z0-9_-]+:") + set(in_browser_job FALSE) + if(line STREQUAL " web-integration:") + set(in_browser_job TRUE) + endif() + endif() + if(in_browser_job AND in_browser_step AND line MATCHES "^ run: (cmake --build [^\n]+)$") + set(ci_browser_build "\n${CMAKE_MATCH_1}\n") + endif() + set(in_browser_step FALSE) + if(in_browser_job AND line STREQUAL " - name: Build browser test") + set(in_browser_step TRUE) + endif() +endforeach() +set(ci "${ci_browser_build}") +foreach(text agents ci frontends) + string(REGEX MATCH "\ncmake --build [^\n]+ --target webtest developer_integration webfront-wf --parallel" browser_build "${${text}}") + if(NOT browser_build) + list(APPEND failures "${text} browser build must include --target webtest developer_integration webfront-wf --parallel") + endif() +endforeach() if(failures) list(JOIN failures "\n " joined) message(FATAL_ERROR "Newcomer documentation drifted from the code:\n ${joined}")