Page MenuHomePhabricator

[Wilds] Stop writing temporary files for linter tests
ClosedPublic

Authored by epriestley on Oct 2 2018, 6:35 PM.
Tags
None
Referenced Files
F13999028: D19728.diff
Thu, Oct 24, 12:28 PM
F13998242: D19728.id.diff
Thu, Oct 24, 8:18 AM
F13962284: D19728.id47138.diff
Tue, Oct 15, 9:14 AM
Unknown Object (File)
Sep 6 2024, 3:42 PM
Unknown Object (File)
Sep 6 2024, 10:11 AM
Unknown Object (File)
Sep 4 2024, 11:14 PM
Unknown Object (File)
Aug 28 2024, 8:09 AM
Unknown Object (File)
Aug 25 2024, 6:02 AM
Subscribers
None

Details

Summary

Ref T13209. See some discussion in T13209#241713.

There's a bug here where 0644 (a numeric literal written in octal) should be '0644' (a string literal). This caused the TempFile to fail to unlink() on Windows.

But with ArcanistWorkingCopyPath we don't have to write an actual file to disk at all, so just don't. Maybe we'll start doing this some of the time later on (e.g., to make it easier to test third-party linters which do not have a "read from stdin" mode), but ideally we shouldn't need to actually write to disk in order to test that linters work, at least in most cases.

Also fix the octal bug itself.

Test Plan

Under Windows, more tests pass and there's no more unlink() permissions error.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley created this revision.
This revision is now accepted and ready to land.Oct 2 2018, 7:56 PM
This revision was automatically updated to reflect the committed changes.