Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
289 changes: 0 additions & 289 deletions app/Http/Controllers/BuildPropertiesController.php

This file was deleted.

48 changes: 0 additions & 48 deletions app/cdash/app/Controller/Api/Timeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ public function getResponse()

// Generate data based on the page that's requesting this chart.
switch ($page) {
case 'buildProperties.php':
return $this->chartForBuildProperties();
case 'testOverview.php':
return $this->chartForTestOverview();
case 'viewBuildGroup.php':
Expand All @@ -93,52 +91,6 @@ private function generateColorMap(): void
}
}

private function chartForBuildProperties()
{
$request = request();
$defect_types = $request->session()->get('defecttypes');

if (!$defect_types) {
abort(400, 'No defecttypes defined in your session');
}
$this->defectTypes = $defect_types;

// Construct an SQL SELECT clause for the requested types of defects.
$defect_keys = [];
$valid_defect_types = [
'configureerrors',
'configurewarnings',
'builderrors',
'buildwarnings',
'testnotrun',
'testfailed',
'testpassed',
];
foreach ($this->defectTypes as $type) {
if (!in_array($type['name'], $valid_defect_types, true)) {
abort(400, "Invalid defect type: {$type['name']}");
}
$defect_keys[] = $type['name'];
}
$defect_selection = implode(', ', $defect_keys);
$stmt = $this->db->prepare("
SELECT
id,
$defect_selection,
starttime
FROM build b
WHERE
projectid = ?
AND parentid IN (0, -1)
ORDER BY starttime
");
if (!pdo_execute($stmt, [$this->project->Id])) {
abort(500, 'Failed to load results');
}

return $this->getTimelineChartData($stmt);
}

private function chartForTestOverview(): array
{
$this->defectTypes = [
Expand Down
5 changes: 1 addition & 4 deletions app/cdash/tests/ctest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,8 @@ set_tests_properties(indexfilters PROPERTIES DEPENDS submitsortingdata)
add_php_test(timeline)
set_tests_properties(timeline PROPERTIES DEPENDS indexfilters)

add_laravel_test(Feature/Timeline)
set_tests_properties(Feature/Timeline PROPERTIES DEPENDS timeline)

add_php_test(nobackup)
set_tests_properties(nobackup PROPERTIES DEPENDS Feature/Timeline)
set_tests_properties(nobackup PROPERTIES DEPENDS timeline)

# TODO: (sbelsk) revisit why this test fails and add proper dependencies
#add_php_test(parallelsubmissions)
Expand Down
17 changes: 0 additions & 17 deletions app/cdash/tests/test_buildproperties.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,23 +116,6 @@ public function testUploadBuildProperties(): void
$warning->Insert();
}

public function testListDefects(): void
{
$buildids = [];
foreach ($this->Builds as $name => $build) {
$buildids[] = $build->Id;
}
$defects = ['builderrors', 'buildwarnings', 'testfailed'];
$query_string = http_build_query(['buildid' => $buildids, 'defect' => $defects]);
$this->get($this->url . "/api/v1/buildProperties.php?$query_string");
$content = $this->getBrowser()->getContent();
$jsonobj = json_decode($content, true);
$num_defects = count($jsonobj['defects']);
if ($num_defects !== 3) {
$this->fail("Expected 3 defects, found $num_defects");
}
}

private function create_build($buildname, $filename, $date, $md5): void
{
$timestamp = strtotime($date);
Expand Down
Loading