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
F13195319: D11690.diff
Sun, May 12, 10:18 PM
F13178112: D11690.diff
Wed, May 8, 8:11 PM
Unknown Object (File)
Sat, Apr 27, 9:30 PM
Unknown Object (File)
Thu, Apr 25, 1:45 AM
Unknown Object (File)
Wed, Apr 17, 2:52 PM
Unknown Object (File)
Mar 30 2024, 7:29 PM
Unknown Object (File)
Mar 27 2024, 6:00 PM
Unknown Object (File)
Mar 24 2024, 9:21 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.