Page MenuHomePhabricator

Add a "Run Tests" Harbormaster build step
AbandonedPublic

Authored by hach-que on Feb 5 2015, 2:08 PM.
Tags
None
Referenced Files
F14405067: D11692.diff
Mon, Dec 23, 6:44 AM
Unknown Object (File)
Thu, Dec 5, 3:16 PM
Unknown Object (File)
Thu, Nov 28, 1:49 PM
Unknown Object (File)
Wed, Nov 27, 8:52 AM
Unknown Object (File)
Nov 22 2024, 6:09 PM
Unknown Object (File)
Nov 19 2024, 10:43 AM
Unknown Object (File)
Nov 1 2024, 8:37 PM
Unknown Object (File)
Oct 23 2024, 5:53 AM
Tokens
"Mountain of Wealth" token, awarded by johnny-bit.

Details

Summary

Ref T5821. This adds a "Run Tests" build step to Harbormaster. With the "json-realtime" option, this enables Harbormaster to display test results in a format similar to Differential as soon as each test finishes (assuming the test engine supports it).

This doesn't yet work on Windows (it assumes a UNIX shell for running arc unit).

Test Plan

Ran a build plan against Arcanist itself and saw some pretty results:

harbormaster-1.png (919×942 px, 73 KB)

Diff Detail

Repository
rP Phabricator
Branch
harbormaster-unit
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 4349
Build 4362: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

hach-que retitled this revision from to Add a "Run Tests" Harbormaster build step.
hach-que updated this object.
hach-que edited the test plan for this revision. (Show Details)
hach-que added a reviewer: epriestley.

Some notes on this:

  • I'm not really happy with the amount of copy-pasta I had to do to bring across the Differential-styled table. I tried with a normal table and PHUI icons but it just looked like junk in comparison (and it was inconsistent). I don't know whether there's really a way to generalize the logic here either, as this has slightly different behaviour in how it shows information (e.g. it doesn't hide pass results by default, and I had to change $userdata = idx($test, 'userdata'); to $userdata = idx($test, 'userData'); to account for the different casing of userData).
  • While it does show results as they're reported, it doesn't yet show tests that are currently running. The diffs related to Arcanist need to be updated to emit JSON blobs when tests being (presumably with a result of "pending" or some such), after which we could update this to handle the new functionality.
  • There doesn't appear to be any way of adding additional classes to PHUI boxes. For the moment I've just added CSS styles assuming that if the Harbormaster styles are present then we're rendering the Differential table inside Harbormaster, but it'd be nicer to have some way of explicitly designating that the Differential table should have those additional styles.

This hasn't been used in any serious way in a production environment.