[Wilds] Make "arc unit" run again, with many caveats


[Wilds] Make "arc unit" run again, with many caveats

Ref T13098. I made this change with a machete and a hacksaw. Major ideas:

The --json, --ugly, and --output flags are a new --format <json|default> flag instead. Formatters (JSON, Console) are modularized instead of being hard-coded. In a future diff, I will probably modularize this more into a general "sink/output" object and implement --target X ("send results to harbormaster build target X") as an output/sink, too, and then when you run --format json --target X we just send all the results to two outputs, and one sends them to the console while the other one uploads them.

The --everything, arc unit path path path ..., and --rev flags don't work yet, and arc unit always behaves like arc unit --everything. This is fine for arcanist/ since the whole test suite currently runs in 5 seconds. I expect to restore these more or less as they previously existed later, once the working copy / repository stuff is in better shape.

The --engine flag is gone. This is an old flag and obsolete with .arcunit. arc unit now requires .arcunit to exist.

Some other flags are gone but I expect to restore them, at least in some form, later on.

Much of this barely works, but it appears that all the tests run, so we can start putting coverage on arc alias, Windows shell escaping, etc.

Test Plan: Ran arc unit, got something that looks like unit test results. When some of them didn't work, got failures.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13098

Differential Revision: https://secure.phabricator.com/D19710