diff --git a/.github/workflows/terminal-perf.yml b/.github/workflows/terminal-perf.yml index 55663071dce..8ad52012c45 100644 --- a/.github/workflows/terminal-perf.yml +++ b/.github/workflows/terminal-perf.yml @@ -102,9 +102,9 @@ jobs: mkdir -p "$RUNNER_TEMP/perf-evidence" for mode in hidden visible; do export ORCA_PERF_DIAGNOSTIC_RENDERER=swiftshader - export ORCA_E2E_FORCE_HEADFUL=0 + export ORCA_PERF_DIAGNOSTIC_XVFB_VISIBLE=0 if [ "$mode" = visible ]; then - export ORCA_E2E_FORCE_HEADFUL=1 + export ORCA_PERF_DIAGNOSTIC_XVFB_VISIBLE=1 fi export ORCA_PERF_DIAGNOSTIC_DIR="$RUNNER_TEMP/perf-evidence/mode-$mode" mkdir -p "$ORCA_PERF_DIAGNOSTIC_DIR" diff --git a/tests/e2e/terminal-perf-diagnostics.ts b/tests/e2e/terminal-perf-diagnostics.ts index c7a2e693132..6281e4ea67c 100644 --- a/tests/e2e/terminal-perf-diagnostics.ts +++ b/tests/e2e/terminal-perf-diagnostics.ts @@ -11,6 +11,17 @@ export function configureTerminalPerfDiagnostics(): void { } const visibility = await orcaPage.evaluate(() => document.visibilityState) const unthrottle = process.env.ORCA_PERF_DIAGNOSTIC_UNTHROTTLE === '1' + const visibleOnXvfb = process.env.ORCA_PERF_DIAGNOSTIC_XVFB_VISIBLE === '1' + if (visibleOnXvfb) { + if (process.platform !== 'linux' || !process.env.GITHUB_ACTIONS || !process.env.DISPLAY) { + throw new Error('Visible diagnostic requires an isolated GitHub Actions Xvfb display') + } + await electronApp.evaluate(({ BrowserWindow }) => { + for (const window of BrowserWindow.getAllWindows()) { + window.showInactive() + } + }) + } const windows = await electronApp.evaluate(({ BrowserWindow }, unthrottle) => { return BrowserWindow.getAllWindows().map((window) => { if (unthrottle) {