Page MenuHomePhabricator

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

Authored by epriestley on Sep 26 2018, 3:12 PM.

Details

Summary

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.

Diff Detail

Repository
rARC Arcanist
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley requested review of this revision.Sep 26 2018, 3:12 PM
epriestley created this revision.
amckinley accepted this revision.Sep 26 2018, 9:28 PM
amckinley added inline comments.
src/workflow/ArcanistUnitWorkflow.php
18

Huh, I never knew this invocation existed. Neat!

This revision is now accepted and ready to land.Sep 26 2018, 9:28 PM
This revision was automatically updated to reflect the committed changes.