Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15400821
D15044.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D15044.diff
View Options
diff --git a/src/applications/differential/controller/DifferentialChangesetViewController.php b/src/applications/differential/controller/DifferentialChangesetViewController.php
--- a/src/applications/differential/controller/DifferentialChangesetViewController.php
+++ b/src/applications/differential/controller/DifferentialChangesetViewController.php
@@ -400,16 +400,23 @@
private function loadCoverage(DifferentialChangeset $changeset) {
$target_phids = $changeset->getDiff()->getBuildTargetPHIDs();
if (!$target_phids) {
- return array();
+ return null;
}
$unit = id(new HarbormasterBuildUnitMessage())->loadAllWhere(
'buildTargetPHID IN (%Ls)',
$target_phids);
+ if (!$unit) {
+ return null;
+ }
+
$coverage = array();
foreach ($unit as $message) {
- $test_coverage = $message->getProperty('coverage', array());
+ $test_coverage = $message->getProperty('coverage');
+ if ($test_coverage === null) {
+ continue;
+ }
$coverage_data = idx($test_coverage, $changeset->getFileName());
if (!strlen($coverage_data)) {
continue;
@@ -417,6 +424,10 @@
$coverage[] = $coverage_data;
}
+ if (!$coverage) {
+ return null;
+ }
+
return ArcanistUnitTestResult::mergeCoverage($coverage);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 18, 2:07 PM (4 d, 2 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7389264
Default Alt Text
D15044.diff (1 KB)
Attached To
Mode
D15044: Distinguish between "no coverage information" and "no test coverage" better
Attached
Detach File
Event Timeline
Log In to Comment