Page MenuHomePhabricator

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

Authored by epriestley on Sep 26 2018, 3:12 PM.
Tags
None
Referenced Files
F15534359: D19710.diff
Wed, Apr 23, 11:50 PM
F15483639: D19710.id47097.diff
Wed, Apr 9, 1:37 PM
F15465316: D19710.id.diff
Wed, Apr 2, 5:07 PM
F15462415: D19710.diff
Tue, Apr 1, 3:01 PM
F15447532: D19710.id47097.diff
Fri, Mar 28, 12:28 AM
F15430403: D19710.id47124.diff
Mar 24 2025, 7:31 AM
F15415794: D19710.id47124.diff
Mar 20 2025, 7:53 AM
F15402382: D19710.diff
Mar 17 2025, 10:15 PM
Subscribers
None

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
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley created this revision.
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.