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)
Feb 8 2025, 2:27 AM
Unknown Object (File)
Feb 8 2025, 2:27 AM
Unknown Object (File)
Feb 8 2025, 2:27 AM
Unknown Object (File)
Jan 24 2025, 7:37 PM
Unknown Object (File)
Jan 23 2025, 11:43 PM
Unknown Object (File)
Jan 23 2025, 11:43 PM
Unknown Object (File)
Jan 23 2025, 11:43 PM
Unknown Object (File)
Jan 22 2025, 1:59 PM

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.