If the property OutputPath is used in the build.yaml with a relative path (to the project path), it will not be made an absolute path by the task, meaning in this case, the test result file end up in the wrong place.
DscTest:
Pester:
Configuration:
TestResult:
OutputPath: ./output/testResults/NUnitXml_HQRM_Tests.xml
The variable $DscTestOutputFolder is set to the absolute path of the projects './output/testResults' folder here:
|
if (-not (Split-Path -IsAbsolute $DscTestOutputFolder)) |
|
{ |
|
$DscTestOutputFolder = Join-Path -Path $OutputDirectory -ChildPath $DscTestOutputFolder |
|
} |
So here for each property that is a path, e.g. OutputPath, should be checked whether it is an absolute path. If not, join the relative path with the path in the variable above.
|
foreach ($propertyName in $propertyNames) |
If the property
OutputPathis used in the build.yaml with a relative path (to the project path), it will not be made an absolute path by the task, meaning in this case, the test result file end up in the wrong place.The variable
$DscTestOutputFolderis set to the absolute path of the projects './output/testResults' folder here:DscResource.Test/source/tasks/Invoke_HQRM_Tests.build.ps1
Lines 90 to 93 in 27c70ec
So here for each property that is a path, e.g.
OutputPath, should be checked whether it is an absolute path. If not, join the relative path with the path in the variable above.DscResource.Test/source/tasks/Invoke_HQRM_Tests.build.ps1
Line 240 in 27c70ec