Skip to content

Commit

Permalink
Merge pull request #331 from AArnott/fixTestResults
Browse files Browse the repository at this point in the history
Take care to use proper slashes per OS for testing
  • Loading branch information
AArnott authored Jan 1, 2025
2 parents daddccc + 16f72e3 commit 392ed3f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
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
2 changes: 1 addition & 1 deletion tools/artifacts/testResults.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $result[$testRoot] = (Get-ChildItem "$testRoot\TestResults" -Recurse -Directory
$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
7 changes: 5 additions & 2 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 Down

0 comments on commit 392ed3f

Please # to comment.