Skip to content

Commit

Permalink
Checking if the result file was produced during the test run (NuGet#693)
Browse files Browse the repository at this point in the history
  • Loading branch information
agr authored Nov 13, 2019
1 parent 153a993 commit 1be0fca
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@ Function Run-Tests {
$TestCount = 0

foreach ($Test in $TestAssemblies) {
& $xUnitExe (Join-Path $PSScriptRoot $Test) -xml "Results.$TestCount.xml"
$TestResultFile = "Results.$TestCount.xml"
& $xUnitExe (Join-Path $PSScriptRoot $Test) -xml $TestResultFile
if (-not (Test-Path $TestResultFile))
{
Write-Error "The test run failed to produce a result file";
exit 1;
}
$TestCount++
}
}
Expand Down

0 comments on commit 1be0fca

Please sign in to comment.