runlog: add debugging to flaky test-runlog.t

Summary: This test very occasionally flakes. Add some extra output for next time it fails.

Reviewed By: DurhamG

Differential Revision: D33178609

fbshipit-source-id: 0e4e4cfd38a28b16d41248f3bdee774ce63e58a6
This commit is contained in:
Muir Manders 2022-01-06 11:26:49 -08:00 committed by Facebook GitHub Bot
parent efd7ac8ab2
commit 8d636609a8

View File

@ -255,12 +255,18 @@ Make sure progress updates when runlog.progress_refresh set.
Test we don't clean up entries with chance=0
$ setconfig runlog.cleanup_chance=0 runlog.cleanup_threshold=0
$ setconfig runlog.cleanup_chance=0 runlog.cleanup_threshold=0 runlog.enable=False
$ rm -f .hg/runlog/*
$ hg root > /dev/null
$ hg root > /dev/null
$ ls .hg/runlog/* | wc -l | sed -e 's/ //g'
$ hg root --config runlog.enable=True > /dev/null
$ hg root --config runlog.enable=True > /dev/null
>>> import os
>>> files = os.listdir(".hg/runlog")
>>> if len(files) != 4:
... print("FILES", files)
... os.system("cat .hg/runlog/*")
>>> print(len(files))
4
$ setconfig runlog.enable=True
Test we always clean up with chance=1
$ setconfig runlog.cleanup_chance=1