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
F14404297: D19729.diff
Mon, Dec 23, 4:43 AM
Unknown Object (File)
Tue, Dec 17, 4:01 AM
Unknown Object (File)
Thu, Dec 12, 10:42 PM
Unknown Object (File)
Tue, Dec 10, 8:16 PM
Unknown Object (File)
Fri, Dec 6, 3:17 PM
Unknown Object (File)
Fri, Dec 6, 12:06 AM
Unknown Object (File)
Thu, Dec 5, 12:36 AM
Unknown Object (File)
Mon, Dec 2, 12:44 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

Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 20980
Build 28500: Run Core Tests

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
1

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.