This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] [test] Don't leave test dirs behind in fs.op.current_path on Windows
ClosedPublic

Authored by mstorsjo on Mar 19 2021, 7:59 AM.

Details

Summary

Previously, every test run left 2 directories behind in the temp dir.

Diff Detail

Event Timeline

mstorsjo requested review of this revision.Mar 19 2021, 7:59 AM
mstorsjo created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptMar 19 2021, 7:59 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
curdeius accepted this revision as: curdeius.Mar 19 2021, 8:16 AM
curdeius added a subscriber: curdeius.

LGTM.

ldionne requested changes to this revision.Mar 22 2021, 8:43 AM
ldionne added a subscriber: ldionne.

Can you use CWDGuard from libcxx/test/support/filesystem_test_helper.h instead?

This revision now requires changes to proceed.Mar 22 2021, 8:43 AM
mstorsjo updated this revision to Diff 332357.Mar 22 2021, 10:36 AM

Fixed nesting of static_env and CWDGuard, restore the cwd (with CWDGuard) before cleaning up the static_env.

ldionne accepted this revision.Mar 22 2021, 12:11 PM
This revision is now accepted and ready to land.Mar 22 2021, 12:11 PM