( )⚙ D11738 tests: run the whole hg-core/path_auditor test in a clean temp dir

This is an archive of the discontinued Mercurial Phabricator instance.

tests: run the whole hg-core/path_auditor test in a clean temp dir
ClosedPublic

Authored by Alphare on Nov 9 2021, 8:18 AM.

Details

Summary

This makes the whole test happen in a clean temporary directory in
$TMPDIR/$random, and simplifies the test a bit by eliminating unnecessarily
dynamic path elements computations.

Before this patch, the first part of the test was happening in /tmp itself.
This allowed coincidentally named files placed in that directory to impact the
outcome of the test. Additionally, this made the second part of the test fail
on systems on which $TMPDIR != /tmp, because the inspected directory was
different from the one in which the mock files were being written. This fully
fixes the issue only partially solved in db2bc9e667a1.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Alphare created this revision.Nov 9 2021, 8:18 AM
Alphare added a subscriber: pacien.Nov 9 2021, 8:20 AM

Note to reviewers, this is *not* my series, I'm just sending it on behalf of @pacien who didn't have time to send them today. I've reviewed these patches and they look good, I'm sending them here to keep a public track of what's happening

This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.