Page MenuHomePhabricator

[Wilds] Pass or skip all remaining Windows unit test failures
ClosedPublic

Authored by epriestley on Oct 2 2018, 6:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 11, 9:07 AM
Unknown Object (File)
Tue, Apr 2, 8:48 AM
Unknown Object (File)
Tue, Apr 2, 8:48 AM
Unknown Object (File)
Sat, Mar 30, 6:57 AM
Unknown Object (File)
Mar 4 2024, 6:20 PM
Unknown Object (File)
Feb 22 2024, 3:44 PM
Unknown Object (File)
Jan 28 2024, 3:50 AM
Unknown Object (File)
Dec 22 2023, 7:46 PM
Subscribers
None

Details

Summary

Ref T13209. This gives us a clean suite under Windows. The actual changes are a lot of miscellaneous stuff which I'll walk through inline in more detail.

The biggest change here is just rewriting some stuff like cat, echo, sleep, etc., in PHP. These commands either don't exist, don't work the same way, or are shell builtins (and we're now bypassing the shell) under Windows. So replace cat ... with php -f cat.php -- ... to make the tests portable.

Test Plan

No remaining test failures on Windows.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley created this revision.
epriestley added inline comments.
src/phage/__tests__/PhageAgentTestCase.php
6โ€“8

I think we can make this work, but it's tricky to debug and a verrrry low priority.

src/unit/engine/phutil/PhutilTestCase.php
115โ€“118

On Windows, the diff binary may not exist. It generally will in a Git Bash environment but not in a cmd.exe environment. At least for now, just fall back to something reasonable-ish here (when printing test differences). Elsewhere we skip a couple tests which need diff.

support/unit/echo.php
2

This version of echo emits its arguments in a way that is unambiguously parseable. I expect to take advantage of this once Windows argument parsing gets test coverage.

This revision is now accepted and ready to land.Oct 2 2018, 10:47 PM
This revision was automatically updated to reflect the committed changes.