@@ -8,6 +8,18 @@ parameters:
88 - Continuous
99 - name : AgentPool
1010 type : object
11+ - name : simulateCrashForTesting
12+ # !!! TEMPORARY DEFAULT: true !!!
13+ # This branch (PR/0.84-fix-e2e-test-flakiness) flips the default to true so
14+ # that PR validation actually exercises the crash-dump-collection path end
15+ # to end. MUST be flipped back to false before merging anywhere — with it
16+ # enabled the E2E app crashes on startup and no real tests run.
17+ type : boolean
18+ default : true
19+ # When true, drops a sentinel file that RNTesterApp-Fabric reads on startup
20+ # and uses to trigger a deliberate access violation. Used to validate that
21+ # the crash-dump collection path (WER LocalDumps + artifact publish)
22+ # actually produces a usable .dmp in CI.
1123 - name : buildMatrix
1224 type : object
1325 default :
@@ -76,12 +88,33 @@ jobs:
7688 echo ##vso[task.setvariable variable=StartedFabricTests]true
7789 displayName: Set StartedFabricTests
7890
91+ # Test-only: arm the crash-simulation sentinel so RNTesterApp-Fabric
92+ # crashes on startup. Validates the WER LocalDumps artifact path.
93+ - ${{ if eq(parameters.simulateCrashForTesting, true) }} :
94+ - pwsh : |
95+ $flagPath = Join-Path $env:ProgramData 'rnw-e2e-simulate-crash.flag'
96+ New-Item -Path $flagPath -ItemType File -Force | Out-Null
97+ Write-Host "Crash-simulation sentinel created at $flagPath"
98+ displayName: Arm crash-simulation sentinel (TEST ONLY)
99+
79100 - script : |
80101 yarn e2etest
81102 displayName: yarn e2etest
82103 workingDirectory: packages/e2e-test-app-fabric
83104 timeoutInMinutes: 10 # Time to wait for this task to complete before the server kills it.
84105
106+ # Always disarm the crash sentinel so it cannot leak to a rerun on
107+ # the same agent.
108+ - ${{ if eq(parameters.simulateCrashForTesting, true) }} :
109+ - pwsh : |
110+ $flagPath = Join-Path $env:ProgramData 'rnw-e2e-simulate-crash.flag'
111+ if (Test-Path $flagPath) {
112+ Remove-Item $flagPath -Force
113+ Write-Host "Removed crash-simulation sentinel at $flagPath"
114+ }
115+ displayName: Disarm crash-simulation sentinel (TEST ONLY)
116+ condition: always()
117+
85118 # On test failure, snapshot any lingering RNTesterApp-Fabric / node
86119 # processes before subsequent steps (or the agent) tear them down.
87120 # WER LocalDumps only fires on actual crashes; this catches hangs
0 commit comments