Per-run / per-case test log isolation for PresentMonAPI2Tests

Aperta
#743 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cpp
Ambito
testing

Direzione di ricerca

Start by locating PresentMonAPI2Tests, TEST_MODULE_INITIALIZE, and the shared TestArtifacts helper, then trace how PMON_TEST_RUN_ID and PMON_TEST_RUN_ID_FILE control run rotation. Check the CTest fixture and agent script paths mentioned in the issue. Done means each case keeps its own logs and output, runs rotate with one .prev retained, and wipe failures are recorded while execution continues.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Problem

PresentMonAPI2Tests write shared suite folders under TestLogs\<Suite> and TestOutput\<Suite>. TEST_MODULE_INITIALIZE used to wipe a hand-maintained list of those folders, which is a poor fit for current runners:

  • CTest loads the DLL once per method, so a wipe either destroys earlier cases in the same ctest invocation or never clears unlisted suites (e.g. CaptureCliWait, UiLaunch).
  • Shared suite folders let log assertions (e.g. ClientLogContains_ in CaptureCliWaitTests) match stale files from prior cases or runs.
  • We need post-mortem data after failures; cavalier deletion of the current run's artifacts is not acceptable.
Proposed solution

Keep every case's logs for the duration of a run; rotate only between runs; keep one previous run as .prev.

  • Shared helper (TestArtifacts) decides rotate vs join from PMON_TEST_RUN_ID / PMON_TEST_RUN_ID_FILE (CTest fixture + agent script) or standalone (IDE / manual vstest).
  • Per-case folders: TestLogs\<Suite>\<NNNN>-<label>\ with case.txt, child process logs, and output\.
  • Preserve AgentDiagnostics for the agent script; reset MachineExpectations with the output root each run; wipe failures warn and continue (rotation-warnings.txt).
Lingua principale
C++
Stelle
2.6k
Fork
201
Merge medio
2g 21h
PR unite (30g)
16

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di GameTechDev/PresentMon

Tutte le issue di GameTechDev/PresentMon

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.