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

Merge latest Library.Template #126

Merged
merged 6 commits into from
Jan 6, 2025
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
7 changes: 0 additions & 7 deletions .github/actions/publish-artifacts/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,6 @@ runs:
name: build_logs-${{ runner.os }}
path: ${{ runner.temp }}/_artifacts/build_logs
continue-on-error: true
- name: 📢 Upload test_logs
if: always()
uses: actions/upload-artifact@v4
with:
name: test_logs-${{ runner.os }}
path: ${{ runner.temp }}/_artifacts/test_logs
continue-on-error: true
- name: 📢 Upload testResults
if: always()
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion tools/Get-ArtifactsStagingDirectory.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Param(
if ($env:BUILD_ARTIFACTSTAGINGDIRECTORY) {
$ArtifactStagingFolder = $env:BUILD_ARTIFACTSTAGINGDIRECTORY
} elseif ($env:RUNNER_TEMP) {
$ArtifactStagingFolder = "$env:RUNNER_TEMP\_artifacts"
$ArtifactStagingFolder = Join-Path $env:RUNNER_TEMP _artifacts
} else {
$ArtifactStagingFolder = [System.IO.Path]::GetFullPath("$PSScriptRoot/../obj/_artifacts")
if ($CleanIfLocal -and (Test-Path $ArtifactStagingFolder)) {
Expand Down
5 changes: 3 additions & 2 deletions tools/artifacts/testResults.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ $result = @{}
$testRoot = Resolve-Path "$PSScriptRoot\..\..\test"
$result[$testRoot] = (Get-ChildItem "$testRoot\TestResults" -Recurse -Directory | Get-ChildItem -Recurse -File)

$testlogsPath = "$env:BUILD_ARTIFACTSTAGINGDIRECTORY\test_logs"
$artifactStaging = & "$PSScriptRoot\..\Get-ArtifactsStagingDirectory.ps1"
$testlogsPath = Join-Path $artifactStaging "test_logs"
if (Test-Path $testlogsPath) {
$result[$testlogsPath] = Get-ChildItem "$testlogsPath\*";
$result[$testlogsPath] = Get-ChildItem $testlogsPath -Recurse;
}

$result
9 changes: 6 additions & 3 deletions tools/dotnet-test-cloud.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ if ($x86) {
}
}

$testBinLog = Join-Path $ArtifactStagingFolder (Join-Path build_logs test.binlog)
$testDiagLog = Join-Path $ArtifactStagingFolder (Join-Path test_logs diag.log)

& $dotnet test $RepoRoot `
--no-build `
-c $Configuration `
Expand All @@ -52,8 +55,8 @@ if ($x86) {
--settings "$PSScriptRoot/test.runsettings" `
--blame-hang-timeout 60s `
--blame-crash `
-bl:"$ArtifactStagingFolder/build_logs/test.binlog" `
--diag "$ArtifactStagingFolder/test_logs/diag.log;TraceLevel=info" `
-bl:"$testBinLog" `
--diag "$testDiagLog;TraceLevel=info" `
--logger trx `

$unknownCounter = 0
Expand All @@ -65,7 +68,7 @@ Get-ChildItem -Recurse -Path $RepoRoot\test\*.trx |% {
$runTitle = $null
if ($x.TestRun.TestDefinitions -and $x.TestRun.TestDefinitions.GetElementsByTagName('UnitTest')) {
$storage = $x.TestRun.TestDefinitions.GetElementsByTagName('UnitTest')[0].storage -replace '\\','/'
if ($storage -match '/(?<tfm>net[^/]+)/(?:(?<rid>[^/]+)/)?(?<lib>[^/]+)\.dll$') {
if ($storage -match '/(?<tfm>net[^/]+)/(?:(?<rid>[^/]+)/)?(?<lib>[^/]+)\.(dll|exe)$') {
if ($matches.rid) {
$runTitle = "$($matches.lib) ($($matches.tfm), $($matches.rid), $Agent)"
} else {
Expand Down