Page MenuHomePhabricator

Allow unit test results to be outputted as JSON in realtime
AbandonedPublic

Authored by hach-que on Feb 5 2015, 8:28 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 7, 8:15 AM
Unknown Object (File)
Apr 30 2025, 7:33 AM
Unknown Object (File)
Apr 26 2025, 12:23 PM
Unknown Object (File)
Apr 25 2025, 4:14 AM
Unknown Object (File)
Apr 25 2025, 2:54 AM
Unknown Object (File)
Apr 21 2025, 9:29 AM
Unknown Object (File)
Apr 3 2025, 5:49 PM
Unknown Object (File)
Mar 28 2025, 11:14 AM

Details

Reviewers
epriestley
Group Reviewers
Blessed Reviewers
Summary

This provides a machine-consumable way to get unit test results as they occur. With the json-realtime option, each test result is outputted on it's own line as "ugly" JSON, prefixed with a ##arc-unit## string.

Mostly this is to allow Harbormaster to parse test results as they are run, rather than parsing all the results at the end.

The ##arc-unit## string is a bit arbitrary, but I'm 99% sure we need a way to distinguish between random build output and Arcanist unit results (especially if there are other tools outputting blobs of JSON).

Test Plan

Ran arc unit --everything --output=json-realtime and saw the expected data.

Diff Detail

Repository
rARC Arcanist
Branch
arc-json-realtime
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 4347
Build 4360: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

hach-que retitled this revision from to Allow unit test results to be outputted as JSON in realtime.
hach-que updated this object.
hach-que edited the test plan for this revision. (Show Details)
hach-que added a reviewer: epriestley.
epriestley edited edge metadata.

This should be --build-target <phid> or similar and use harbormaster.sendmessage to provide results directly to Harbormaster, which now supports formal lint and unit messages.

This revision now requires changes to proceed.Aug 8 2015, 6:43 PM

To be implemented completely differently.

D14190 adds --target to arc unit, although doesn't yet stream results in realtime.