From bda874be3a552f2002fa162514ea519796d4949a Mon Sep 17 00:00:00 2001 From: Dennis Beuchler Date: Mon, 21 Sep 2020 12:57:50 +0200 Subject: [PATCH] Run open cover tests as administrator --- .build/BuildToolkit.ps1 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.build/BuildToolkit.ps1 b/.build/BuildToolkit.ps1 index 7467a9544..1c2d482f6 100644 --- a/.build/BuildToolkit.ps1 +++ b/.build/BuildToolkit.ps1 @@ -312,7 +312,7 @@ function Invoke-CoverTests($SearchPath = $RootPath, $SearchFilter = "*.csproj", $openCoverAgs = "-target:$global:NunitCli", "-targetargs:/config:$env:MORYX_BUILD_CONFIG /result:$nunitXml $testAssembly" } - $openCoverAgs += "-log:Debug", "-register:user", "-output:$openCoverXml", "-hideskipped:all", "-skipautoprops"; + $openCoverAgs += "-log:Debug", "-register:administrator", "-output:$openCoverXml", "-hideskipped:all", "-skipautoprops"; $openCoverAgs += "-returntargetcode" # We need the nunit return code $openCoverAgs += "-filter:$includeFilter $excludeFilter" @@ -336,8 +336,6 @@ function Invoke-CoverTests($SearchPath = $RootPath, $SearchFilter = "*.csproj", Write-Host "Nunit exited with $errorText for $projectName"; Invoke-ExitCodeCheck $exitCode; } - - Invoke-ExitCodeCheck $LastExitCode; } }