Skip to content

Commit

Permalink
Merge pull request #1119 from Kitware/releases/3.0
Browse files Browse the repository at this point in the history
Merge release branch back into master
  • Loading branch information
zackgalbreath authored Feb 19, 2021
2 parents 70eb0da + 2d125e5 commit c176167
Show file tree
Hide file tree
Showing 39 changed files with 1,553 additions and 523 deletions.
9 changes: 9 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ MIX_APP_URL="${APP_URL}"
# cdash.php
#SLOW_PAGE_TIME=10

# The label on the "user" field for the Login form, defaults to Email.
# Consider changing this for clarity if you're authenticating against
# something other than an email address in LDAP.
#LOGIN_FIELD=Email

# Maximum number of builds allowed per project.
# When set to 0 projects are not limited by number of builds.
#BUILDS_PER_PROJECT=0
Expand Down Expand Up @@ -76,10 +81,14 @@ MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
# The type of LDAP server you are connecting to.
# Valid values are activedirectory, openldap, and freeipa.
#LDAP_PROVIDER=
# Whether or not to log LDAP activities. Useful for debugging.
#LDAP_LOGGING=

# ldap_auth.php
# The LDAP users attribute containing their email address ('mail' by default).
#LDAP_EMAIL_ATTRIBUTE=
# The LDAP users attribute used to locate your users. ('mail' by default).
#LDAP_LOCATE_USERS_BY=
# The LDAP users attribute used for authentication ('distinguishedname' by default).
#LDAP_BIND_USERS_BY=
# The LDAP attribute name that contains your users object GUID.
Expand Down
18 changes: 18 additions & 0 deletions app/Models/Ldap/User.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace App\Models\Ldap;

use Adldap\Models\User as BaseModel;

class User extends BaseModel
{
/**
* Returns the model's GUID as is (not converted to binary).
*
* @return string|null
*/
public function getConvertedGuid()
{
return $this->getObjectGuid();
}
}
5 changes: 5 additions & 0 deletions app/Schemas/OpenLDAP.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,9 @@ public function objectGuid()
{
return env('LDAP_GUID', parent::objectGuid());
}

public function userModel()
{
return \App\Models\Ldap\User::class;
}
}
4 changes: 3 additions & 1 deletion app/Services/TestCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ public function computeCrc32()
$crc32_input .= pdo_real_escape_string($this->testOutput);
$crc32_input .= pdo_real_escape_string($this->testDetails);
foreach ($this->measurements as $measurement) {
$crc32_input .= $measurement->Type . $measurement->Name . $measurement->Value;
$crc32_input .= "_" . pdo_real_escape_string($measurement->type);
$crc32_input .= "_" . pdo_real_escape_string($measurement->name);
$crc32_input .= "_" . pdo_real_escape_string($measurement->value);
}

foreach ($this->images as $image) {
Expand Down
2 changes: 1 addition & 1 deletion app/cdash/app/Model/DynamicAnalysis.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public function Insert()
$uncompressed_log = '';
$inflate_context = inflate_init(ZLIB_ENCODING_DEFLATE);
foreach (str_split($this->Log, 1024) as $chunk) {
$uncompressed_log = inflate_add($inflate_context, $chunk, ZLIB_NO_FLUSH);
$uncompressed_log .= inflate_add($inflate_context, $chunk, ZLIB_NO_FLUSH);
if (strlen($uncompressed_log) >= $max_log_length) {
break;
}
Expand Down
9 changes: 9 additions & 0 deletions app/cdash/include/ctestparser.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ function generateBackupFileName($projectname, $buildname, $sitename, $stamp,
$filename .= $sitename_escaped . '_' . $buildname_escaped . '_' . $stamp . '_';
}
$filename .= $currenttimestamp . '_' . $file . $ext;

// Make sure we don't generate a filename that's too long, otherwise
// fopen() will fail later.
$maxChars = 250;
$textLength = strlen($filename);
if ($textLength > $maxChars) {
$filename = substr_replace($filename, '', $maxChars/2, $textLength-$maxChars);
}

return $filename;
}

Expand Down
2 changes: 1 addition & 1 deletion app/cdash/include/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
// Current version
$CDASH_VERSION_MAJOR = '3';
$CDASH_VERSION_MINOR = '0';
$CDASH_VERSION_PATCH = '2';
$CDASH_VERSION_PATCH = '3';
$CDASH_VERSION = $CDASH_VERSION_MAJOR . '.' . $CDASH_VERSION_MINOR . '.' . $CDASH_VERSION_PATCH;
2 changes: 1 addition & 1 deletion app/cdash/public/api/v1/testDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ function utf8_for_xml($string)
// If so we should make that chart appear when they click next or previous.
$extra_url = '';
if (array_key_exists('graph', $_GET)) {
$extra_url = "&graph=" . $_GET['graph'];
$extra_url = "?graph=" . $_GET['graph'];
}

// Previous build
Expand Down
2 changes: 1 addition & 1 deletion app/cdash/public/views/viewTest.html
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ <h3 ng-switch-default id="test-totals-indicator">

<td ng-if="::cdash.project.showtesttime == 1"
align="center" ng-class="::test.timestatusclass">
<a ng-href="{{::test.detailsLink}}&graph=time"
<a ng-href="{{::test.detailsLink}}?graph=time"
ng-click="cancelAjax()">{{::test.timestatus}}</a>
</td>

Expand Down
4 changes: 4 additions & 0 deletions app/cdash/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ add_laravel_test(/Unit/app/Validators/PasswordTest)
add_laravel_test(/Feature/ConsumeSubmissionCommand)
add_laravel_test(/Feature/CDashTest)
add_laravel_test(/Feature/LdapAuthWithRulesTest)
add_laravel_test(/Feature/OpenLdapAuthWithOverrides)
add_laravel_test(/Feature/MigrateConfigCommand)
add_laravel_test(/Feature/UserCommand)
add_unit_test(/PHPUnitTest)
Expand Down Expand Up @@ -227,6 +228,9 @@ add_php_test(numericupdate)
add_php_test(attachedfiles)
add_php_test(subprojectorder)
add_php_test(testimages)
add_php_test(dynamicanalysislogs)
add_php_test(namedmeasurements)
add_php_test(longbuildname)

add_subdirectory(ctest)

Expand Down
16 changes: 16 additions & 0 deletions app/cdash/tests/data/DynamicAnalysisLogs/Build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<Site BuildName="leak_lots"
BuildStamp="20210125-1520-Experimental"
Name="localhost"
Generator="ctest-3.19.0"
>
<Build>
<StartDateTime>Jan 25 10:20 EST</StartDateTime>
<StartBuildTime>1611588058</StartBuildTime>
<BuildCommand>/usr/local/bin/cmake --build . --config "Debug" -- -i</BuildCommand>
<Log Encoding="base64" Compression="bin/gzip"/>
<EndDateTime>Jan 25 10:20 EST</EndDateTime>
<EndBuildTime>1611588059</EndBuildTime>
<ElapsedMinutes>0</ElapsedMinutes>
</Build>
</Site>
18 changes: 18 additions & 0 deletions app/cdash/tests/data/DynamicAnalysisLogs/Configure.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<Site BuildName="leak_lots"
BuildStamp="20210125-1520-Experimental"
Name="localhost"
Generator="ctest-3.19.0"
>
<Configure>
<StartDateTime>Jan 25 10:20 EST</StartDateTime>
<StartConfigureTime>1611588058</StartConfigureTime>
<ConfigureCommand>"cmake" "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_CXX_FLAGS=-g -O0 --coverage" "-DCMAKE_C_FLAGS=-g -O0 --coverage" "-GUnix Makefiles" "/tmp/leak_lots"</ConfigureCommand>
<Log>-- Build files have been written to: /tmp/leak_lots_bin
</Log>
<ConfigureStatus>0</ConfigureStatus>
<EndDateTime>Jan 25 10:20 EST</EndDateTime>
<EndConfigureTime>1611588058</EndConfigureTime>
<ElapsedMinutes>0</ElapsedMinutes>
</Configure>
</Site>
30 changes: 30 additions & 0 deletions app/cdash/tests/data/DynamicAnalysisLogs/DynamicAnalysis.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<Site BuildName="leak_lots"
BuildStamp="20210125-1520-Experimental"
Name="localhost"
Generator="ctest-3.19.0"
>
<DynamicAnalysis Checker="Valgrind">
<StartDateTime>Jan 25 10:20 EST</StartDateTime>
<StartTestTime>1611588059</StartTestTime>
<TestList>
<Test>./main</Test>
</TestList>
<Test Status="passed">
<Name>main</Name>
<Path>.</Path>
<FullName>./main</FullName>
<FullCommandLine>/usr/bin/valgrind "--log-file=/tmp/leak_lots_bin/Testing/Temporary/MemoryChecker.1.log" "--leak-check=full" "--show-reachable=yes" "--track-origins=yes" "/tmp/leak_lots_bin/main"</FullCommandLine>
<Results>
<Defect type="Memory Leak">60</Defect>
</Results>
<Log compression="gzip" encoding="base64">eJzN211vm0gUBuD7/oq520SyY+YT8DaVwB/pbpPdKFWqXVVVhM3YZoPBApzE/36HxHW9OdU6snSkk4uEADPwziCdx1hzfq5FeH7OruxyurDT+w5L2NIuy2rDbFWVFUttY6dNWb073545KFebKpsvGnYyOGXC80RXeNx3DYuUXfxxyy6uL39JO2yyYb+v8ywp2Gf7mFQpsw1L8rNdP7d1VszZlySfV1mRduUZl2fecyeX2eTL6K9fWWWrdcEes2bBugs2czcz3V07K2bl3i0tl65hn/VWVfmPu9261yxXd67F3TRN6kUvt8n9XV429d0kK3rLJCt2ba+TyhYNu/5t2GdK691+uPFxFF2zz7dXV9HN3/3d3vYnK9i6tixpmH3Kmj6THeN5bgAaW7fHjNvOy+l9vdeoKZskZwubrFzTZG77zCg3PO60usMUm1XWuo2Adzyptj09H00am/64tfeTD1eXn973Jh/Y931q78J8e13mMrqJnGVF1th8w/Kybkew/Vu7UZ6WbnY4K2fuTvdzuTzekxpILwjHfVaubJW4B4EV9vHrt5N1UWfzwqauk2J+yk5cd711XfXybNJ72E5q72G+qmxeJundcvt8dZNlalQ3z4r101ldnu5fzz0x3hP3Qn+s+6ydJHbS/j6bTvuKn6KkFnRSBzwGqQVOakkoteIgtcRJrQilNj5IrXBSa0KpgyFIrXFSG0KpYwlSG5zUPqHUwxCk9nFSB4RSj8cgdYCTOqSTOhSwXoc4qblHKLYCBVt7SLEJ6Sz0QcXWSDrjhHjmcoPYSDzjhHwWxqBmaySfcUJAC0egaGskoHFCQos8ULU1ktA4IaJFYgBiIxGNEzJapIBWNJLROCGkRb4AsZGQxgkpLQqB0jSS0gQhpUVx8Dq2QVKaIKS0aAhwarDeoRFSWjQegdhIShOElBYLYHKDpDRBSGmxUiA2ktIEIaXF8O2hQVKaIKS0OIhAbCSlCUJKiyPwCcwgKU0QUlo89EBsJKUJQkqLx+CDp0FSmiSktAE3r2P7B5QWHBubkNKkBCY/MNlHpyaENKmBTTnWZBNCmgwA0vgBkh8dmxDSZAS0wg+Q/OjYhJAmB6Bs8wMkPzo2IaRJWL/4AZIfHZsQ0hQHL075AZIfHZsQ0pQEbxD5AZIfHZsQ0pQBZZsfIPmxsRUhpKkA1u0DJD86NiGkqRjWbSSlKUJKU0NQtwWS0hQhpakxqNsCSWmKkNK0AHVbIClNEVKaVqBuCySlKUJK0wbUbYGkNEVIaRp+BSaQlKYIKU3HoG4LJKUpQkrTI1C3BZLSNCGlGQ/WbSSlaUJKMwLWbSSlaUJKMxrUbYmkNE1IacYHdVsiKU0TUpoJQd2WSErThJRmBqBuSySlaUJKMyNQtyWS0jQhpfkc1G2JpDRNSGm+BHVbIilNE1Kar0HdlkhKM4SU5gewbu8r7fvG5Sj69NNFp6+yvmnRqdufZm4wml2jvQY/O5+xlRu/bPLW8+smy3M33Ml0kUxy+4b+20brlRvBurbp/5+/2xg/rwReF03dzufLAmU3Se3S4R99vSxfrjt7q4j7rPuw62R0c/PnzW5k2+F6acBmVbls/52WRWOf3DVO/nuDz8cdsT7aPC/ZY1nl6TvpsbRcu8TuMaySzVfufWv3ZUWzt+OiLNPJxm6b/AscBejZ====</Log>
</Test>
<DefectList>
<Defect Type="Memory Leak"/>
</DefectList>
<EndDateTime>Jan 25 10:21 EST</EndDateTime>
<EndTestTime>1611588060</EndTestTime>
<ElapsedMinutes>0</ElapsedMinutes>
</DynamicAnalysis>
</Site>
47 changes: 47 additions & 0 deletions app/cdash/tests/data/DynamicAnalysisLogs/Test.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<Site BuildName="leak_lots"
BuildStamp="20210125-1520-Experimental"
Name="localhost"
Generator="ctest-3.19.0"
>
<Testing>
<StartDateTime>Jan 25 10:20 EST</StartDateTime>
<StartTestTime>1611588059</StartTestTime>
<TestList>
<Test>./main</Test>
</TestList>
<Test Status="passed">
<Name>main</Name>
<Path>.</Path>
<FullName>./main</FullName>
<FullCommandLine>/tmp/leak_lots_bin/main</FullCommandLine>
<Results>
<NamedMeasurement type="numeric/double" name="Execution Time">
<Value>0.0027085</Value>
</NamedMeasurement>
<NamedMeasurement type="numeric/double" name="Processors">
<Value>1</Value>
</NamedMeasurement>
<NamedMeasurement type="text/string" name="Completion Status">
<Value>Completed</Value>
</NamedMeasurement>
<NamedMeasurement type="text/string" name="Command Line">
<Value>/tmp/leak_lots_bin/main</Value>
</NamedMeasurement>
<NamedMeasurement type="text/string" name="Environment">
<Value>#CTEST_RESOURCE_GROUP_COUNT=</Value>
</NamedMeasurement>
<Measurement>
<Value>Hello world
30 double array[10]
30 int array[10]
Goodbye world
</Value>
</Measurement>
</Results>
</Test>
<EndDateTime>Jan 25 10:20 EST</EndDateTime>
<EndTestTime>1611588059</EndTestTime>
<ElapsedMinutes>0</ElapsedMinutes>
</Testing>
</Site>
18 changes: 18 additions & 0 deletions app/cdash/tests/data/LongBuildName/Configure.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<Site BuildName="this build name is really really really really really really really really really really really really really really really really really really really really reall really really really really really really really really really really really really long"
BuildStamp="20210217-1356-Experimental"
Name="hesperides"
Generator="ctest-3.20.0-rc1"
>
<Configure>
<StartDateTime>Feb 17 08:56 EST</StartDateTime>
<StartConfigureTime>1613570202</StartConfigureTime>
<ConfigureCommand>"cmake" "-GUnix Makefiles" "/tmp/src"</ConfigureCommand>
<Log>This is my config output
</Log>
<ConfigureStatus>0</ConfigureStatus>
<EndDateTime>Feb 17 08:56 EST</EndDateTime>
<EndConfigureTime>1613570203</EndConfigureTime>
<ElapsedMinutes>0</ElapsedMinutes>
</Configure>
</Site>
55 changes: 55 additions & 0 deletions app/cdash/tests/data/NamedMeasurements/Test_1.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<Site BuildName="test_named_measurements"
BuildStamp="20210204-1412-Experimental"
Name="hesperides"
Generator="ctest-3.19.4"
>
<Testing>
<StartDateTime>Feb 04 09:12 EST</StartDateTime>
<StartTestTime>1612447952</StartTestTime>
<TestList>
<Test>./measurements</Test>
</TestList>
<Test Status="failed">
<Name>measurements</Name>
<Path>.</Path>
<FullName>./measurements</FullName>
<FullCommandLine>/tmp/bin/measurements</FullCommandLine>
<Results>
<NamedMeasurement type="text/string" name="Exit Code">
<Value>Failed</Value>
</NamedMeasurement>
<NamedMeasurement type="text/string" name="Exit Value">
<Value>1</Value>
</NamedMeasurement>
<NamedMeasurement name="archive directory" type="text/link">
<Value>https://example.com/link1.txt</Value>
</NamedMeasurement>
<NamedMeasurement type="numeric/double" name="Execution Time">
<Value>0.0583304</Value>
</NamedMeasurement>
<NamedMeasurement type="numeric/double" name="Processors">
<Value>1</Value>
</NamedMeasurement>
<NamedMeasurement type="text/string" name="Completion Status">
<Value>Completed</Value>
</NamedMeasurement>
<NamedMeasurement type="text/string" name="Command Line">
<Value>/tmp/bin/measurements</Value>
</NamedMeasurement>
<NamedMeasurement type="text/string" name="Environment">
<Value>#CTEST_RESOURCE_GROUP_COUNT=</Value>
</NamedMeasurement>
<Measurement>
<Value>Here is some test output

Here is some more test output
</Value>
</Measurement>
</Results>
</Test>
<EndDateTime>Feb 04 09:12 EST</EndDateTime>
<EndTestTime>1612447953</EndTestTime>
<ElapsedMinutes>0</ElapsedMinutes>
</Testing>
</Site>
55 changes: 55 additions & 0 deletions app/cdash/tests/data/NamedMeasurements/Test_2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<Site BuildName="test_named_measurements"
BuildStamp="20210204-1413-Experimental"
Name="hesperides"
Generator="ctest-3.19.4"
>
<Testing>
<StartDateTime>Feb 04 09:13 EST</StartDateTime>
<StartTestTime>1612448012</StartTestTime>
<TestList>
<Test>./measurements</Test>
</TestList>
<Test Status="failed">
<Name>measurements</Name>
<Path>.</Path>
<FullName>./measurements</FullName>
<FullCommandLine>/tmp/bin/measurements</FullCommandLine>
<Results>
<NamedMeasurement type="text/string" name="Exit Code">
<Value>Failed</Value>
</NamedMeasurement>
<NamedMeasurement type="text/string" name="Exit Value">
<Value>1</Value>
</NamedMeasurement>
<NamedMeasurement name="archive directory" type="text/link">
<Value>https://example.com/link2.txt</Value>
</NamedMeasurement>
<NamedMeasurement type="numeric/double" name="Execution Time">
<Value>0.0583304</Value>
</NamedMeasurement>
<NamedMeasurement type="numeric/double" name="Processors">
<Value>1</Value>
</NamedMeasurement>
<NamedMeasurement type="text/string" name="Completion Status">
<Value>Completed</Value>
</NamedMeasurement>
<NamedMeasurement type="text/string" name="Command Line">
<Value>/tmp/bin/measurements</Value>
</NamedMeasurement>
<NamedMeasurement type="text/string" name="Environment">
<Value>#CTEST_RESOURCE_GROUP_COUNT=</Value>
</NamedMeasurement>
<Measurement>
<Value>Here is some test output

Here is some more test output
</Value>
</Measurement>
</Results>
</Test>
<EndDateTime>Feb 04 09:13 EST</EndDateTime>
<EndTestTime>1612448013</EndTestTime>
<ElapsedMinutes>0</ElapsedMinutes>
</Testing>
</Site>
Loading

0 comments on commit c176167

Please sign in to comment.