Skip to content

Commit 0125f98

Browse files
Fix build error formatting (#3477)
CTest stopped adding trailing newlines to the `Build.xml` `<Text>` element sometime between the versions used to generate most of the test data and the most recent version of CTest. This commit resolves the issue by ensuring that exactly one newline is placed between the Text and PostContext.
1 parent dec91a1 commit 0125f98

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

app/cdash/app/Model/BuildError.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
namespace CDash\Model;
1919

2020
use App\Models\BasicBuildAlert;
21+
use Illuminate\Support\Str;
2122

2223
/** BuildError */
2324
class BuildError
@@ -54,7 +55,7 @@ public function Insert(): void
5455
'sourceline' => (int) $this->SourceLine,
5556
'repeatcount' => (int) $this->RepeatCount,
5657
'newstatus' => 0,
57-
'stdoutput' => $this->PreContext . $this->Text . $this->PostContext,
58+
'stdoutput' => $this->PreContext . Str::rtrim($this->Text) . PHP_EOL . $this->PostContext,
5859
'stderror' => $this->Text,
5960
]);
6061
}

0 commit comments

Comments
 (0)