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
Unknown Object (File)
Tue, Nov 19, 12:49 AM
Unknown Object (File)
Fri, Nov 15, 11:07 AM
Unknown Object (File)
Mon, Nov 11, 9:24 AM
Unknown Object (File)
Thu, Nov 7, 10:02 AM
Unknown Object (File)
Oct 22 2024, 11:06 PM
Unknown Object (File)
Oct 9 2024, 10:17 AM
Unknown Object (File)
Oct 7 2024, 5:36 AM
Unknown Object (File)
Oct 2 2024, 3:44 AM
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.