Skip to content

Commit 392ed3f

Browse files
authored
Merge pull request #331 from AArnott/fixTestResults
Take care to use proper slashes per OS for testing
2 parents daddccc + 16f72e3 commit 392ed3f

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

tools/Get-ArtifactsStagingDirectory.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Param(
44
if ($env:BUILD_ARTIFACTSTAGINGDIRECTORY) {
55
$ArtifactStagingFolder = $env:BUILD_ARTIFACTSTAGINGDIRECTORY
66
} elseif ($env:RUNNER_TEMP) {
7-
$ArtifactStagingFolder = "$env:RUNNER_TEMP\_artifacts"
7+
$ArtifactStagingFolder = Join-Path $env:RUNNER_TEMP _artifacts
88
} else {
99
$ArtifactStagingFolder = [System.IO.Path]::GetFullPath("$PSScriptRoot/../obj/_artifacts")
1010
if ($CleanIfLocal -and (Test-Path $ArtifactStagingFolder)) {

tools/artifacts/testResults.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ $result[$testRoot] = (Get-ChildItem "$testRoot\TestResults" -Recurse -Directory
1010
$artifactStaging = & "$PSScriptRoot\..\Get-ArtifactsStagingDirectory.ps1"
1111
$testlogsPath = Join-Path $artifactStaging "test_logs"
1212
if (Test-Path $testlogsPath) {
13-
$result[$testlogsPath] = Get-ChildItem "$testlogsPath\*";
13+
$result[$testlogsPath] = Get-ChildItem $testlogsPath -Recurse;
1414
}
1515

1616
$result

tools/dotnet-test-cloud.ps1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ if ($x86) {
4444
}
4545
}
4646

47+
$testBinLog = Join-Path $ArtifactStagingFolder (Join-Path build_logs test.binlog)
48+
$testDiagLog = Join-Path $ArtifactStagingFolder (Join-Path test_logs diag.log)
49+
4750
& $dotnet test $RepoRoot `
4851
--no-build `
4952
-c $Configuration `
@@ -52,8 +55,8 @@ if ($x86) {
5255
--settings "$PSScriptRoot/test.runsettings" `
5356
--blame-hang-timeout 60s `
5457
--blame-crash `
55-
-bl:"$ArtifactStagingFolder/build_logs/test.binlog" `
56-
--diag "$ArtifactStagingFolder/test_logs/diag.log;TraceLevel=info" `
58+
-bl:"$testBinLog" `
59+
--diag "$testDiagLog;TraceLevel=info" `
5760
--logger trx `
5861

5962
$unknownCounter = 0

0 commit comments

Comments
 (0)