INNER CODE UNIT · Python

_denoised_logcat

etchdroid/etchdroid · appium-tests/conftest.py:43

def _denoised_logcat(name: str) -> str:
    if not Config.LOGCAT_DIR:
        return "(LOGCAT_DIR not configured; no logcat captured)"
    path = Path(Config.LOGCAT_DIR) / f"{name}.app.denoised.log"
    try:
        text = path.read_text(errors="replace").strip()
    except OSError as e:
        # Denoising failed (or never ran) in the fixture — say so rather than dumping
        # the raw, un-denoised log.
        return f"(denoised logcat unavailable: {e})"
    return text or "(denoised logcat is empty)"


# Test boundaries and outcomes, for annotating the CI screen recording afterwards. Both are
# no-ops unless VM_MARKERS_FILE is set; see utils.mark and scripts/annotate-recording.py.
def pytest_runtest_logstart(nodeid, location):
    mark(nodeid.split("::")[-1], kind="test")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…