Skip to content

Commit

Permalink
Merge pull request #126 from AArnott/auto/libtemplateUpdate
Browse files Browse the repository at this point in the history
Merge latest Library.Template
  • Loading branch information
AArnott authored Jan 6, 2025
2 parents a05eb25 + 361fe4a commit 0afa785
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
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

0 comments on commit 0afa785

Please sign in to comment.