Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove broken "Compress Test Output" button #1971

Merged
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
20 changes: 0 additions & 20 deletions app/Http/Controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,26 +143,6 @@ public function upgrade()

$configFile = $config->get('CDASH_ROOT_DIR') . "/AuditReport.log";

// Compress the test output
if (isset($_POST['CompressTestOutput'])) {
// Do it slowly so we don't take all the memory
$query = pdo_query('SELECT count(*) FROM testoutput');
$query_array = pdo_fetch_array($query);
$ntests = $query_array[0];
$ngroup = 1024;
for ($i = 0; $i < $ntests; $i += $ngroup) {
$query = pdo_query('SELECT id,output FROM testoutput ORDER BY id ASC LIMIT ' . $ngroup . ' OFFSET ' . $i);
while ($query_array = pdo_fetch_array($query)) {
// Try uncompressing to see if it's already compressed
if (@gzuncompress($query_array['output']) === false) {
$compressed = pdo_real_escape_string(gzcompress($query_array['output']));
pdo_query("UPDATE testoutput SET output='" . $compressed . "' WHERE id=" . $query_array['id']);
echo pdo_error();
}
}
}
}

// Compute the testtime
if ($ComputeTestTiming) {
$TestTimingDays = (int) ($_POST['TestTimingDays'] ?? 0);
Expand Down
4 changes: 0 additions & 4 deletions app/cdash/public/upgrade.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@
<td><div align="right">Compute update statistics:</div></td>
<td><div align="left">for the last <input type="text" name="UpdateStatisticsDays" size="2" value="4"/> days <input type="submit" name="ComputeUpdateStatistics" value="Compute update statistics"/></div></td>
</tr>
<tr>
<td><div align="right">Compress test output (can take a long time):</div></td>
<td><input type="submit" name="CompressTestOutput" value="Compress test output"/></td>
</tr>
<tr>
<td><div align="right">Cleanup CDash (can take a long time):</div></td>
<td><input type="submit" name="Cleanup" value="Cleanup database"/></td>
Expand Down
12 changes: 0 additions & 12 deletions app/cdash/tests/test_upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,6 @@ function testComputeUpdateStatistics()
}
*/

public function testCompressTestOutput()
{
if (!$this->getMaintenancePage()) {
return 1;
}
set_time_limit(0);
if (!$this->clickSubmitByName('CompressTestOutput')) {
$this->fail('clicking CompressTestOutput returned false');
}
$this->pass('Passed');
}

public function testCleanup()
{
if (!$this->getMaintenancePage()) {
Expand Down
23 changes: 5 additions & 18 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -251,15 +251,15 @@ parameters:
#^Call to deprecated function pdo_error\\(\\)\\:
04/01/2023$#
"""
count: 4
count: 3
path: app/Http/Controllers/AdminController.php

-
message: """
#^Call to deprecated function pdo_fetch_array\\(\\)\\:
04/01/2023$#
"""
count: 10
count: 8
path: app/Http/Controllers/AdminController.php

-
Expand All @@ -275,15 +275,7 @@ parameters:
#^Call to deprecated function pdo_query\\(\\)\\:
04/01/2023$#
"""
count: 15
path: app/Http/Controllers/AdminController.php

-
message: """
#^Call to deprecated function pdo_real_escape_string\\(\\)\\:
04/01/2023$#
"""
count: 1
count: 12
path: app/Http/Controllers/AdminController.php

-
Expand Down Expand Up @@ -331,7 +323,7 @@ parameters:

-
message: "#^Cannot access offset 0 on array\\|false\\|null\\.$#"
count: 2
count: 1
path: app/Http/Controllers/AdminController.php

-
Expand Down Expand Up @@ -26110,7 +26102,7 @@ parameters:

-
message: "#^Call to deprecated method pass\\(\\) of class SimpleTestCase\\.$#"
count: 3
count: 2
path: app/cdash/tests/test_upgrade.php

-
Expand Down Expand Up @@ -26138,11 +26130,6 @@ parameters:
count: 1
path: app/cdash/tests/test_upgrade.php

-
message: "#^Method UpgradeTestCase\\:\\:testCompressTestOutput\\(\\) has no return type specified\\.$#"
count: 1
path: app/cdash/tests/test_upgrade.php

-
message: "#^Method UpgradeTestCase\\:\\:testComputeTestTiming\\(\\) has no return type specified\\.$#"
count: 1
Expand Down