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
F12834211: D19710.id47097.diff
Thu, Mar 28, 2:30 PM
F12826838: D19710.diff
Thu, Mar 28, 9:40 AM
F12825703: D19710.id47124.diff
Thu, Mar 28, 9:04 AM
Unknown Object (File)
Thu, Mar 14, 5:03 PM
Unknown Object (File)
Sun, Mar 10, 2:30 AM
Unknown Object (File)
Feb 11 2024, 6:30 AM
Unknown Object (File)
Feb 3 2024, 7:33 PM
Unknown Object (File)
Feb 1 2024, 10:09 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

Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 20907
Build 28422: Run Core Tests

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.