@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Distinguish between "no coverage information" and "no test coverage" better

Summary: Fixes T10169. Diffs with no build targets were incorrectly showing as though they had no test coverage, when we actually want to show them having no coverage information available.

Test Plan: Viewed an older revision, saw a column of "Not Executable" before change, now see no column.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10169

Differential Revision: https://secure.phabricator.com/D15044

+13 -2
+13 -2
src/applications/differential/controller/DifferentialChangesetViewController.php
··· 400 400 private function loadCoverage(DifferentialChangeset $changeset) { 401 401 $target_phids = $changeset->getDiff()->getBuildTargetPHIDs(); 402 402 if (!$target_phids) { 403 - return array(); 403 + return null; 404 404 } 405 405 406 406 $unit = id(new HarbormasterBuildUnitMessage())->loadAllWhere( 407 407 'buildTargetPHID IN (%Ls)', 408 408 $target_phids); 409 409 410 + if (!$unit) { 411 + return null; 412 + } 413 + 410 414 $coverage = array(); 411 415 foreach ($unit as $message) { 412 - $test_coverage = $message->getProperty('coverage', array()); 416 + $test_coverage = $message->getProperty('coverage'); 417 + if ($test_coverage === null) { 418 + continue; 419 + } 413 420 $coverage_data = idx($test_coverage, $changeset->getFileName()); 414 421 if (!strlen($coverage_data)) { 415 422 continue; 416 423 } 417 424 $coverage[] = $coverage_data; 425 + } 426 + 427 + if (!$coverage) { 428 + return null; 418 429 } 419 430 420 431 return ArcanistUnitTestResult::mergeCoverage($coverage);