From a6fd5c70d9c5ae219793812f3f858e4b33c90cd9 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Fri, 1 Apr 2016 23:09:39 -0700 Subject: [PATCH] Fix FullCLR build script for build instead of publish --- PowerShellGitHubDev.psm1 | 21 ++++++++++++--------- appveyor.yml | 2 +- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/PowerShellGitHubDev.psm1 b/PowerShellGitHubDev.psm1 index 74a281c06..1b6605fcd 100644 --- a/PowerShellGitHubDev.psm1 +++ b/PowerShellGitHubDev.psm1 @@ -119,7 +119,13 @@ function Start-PSBuild { $Arguments += "--framework", $Framework $Arguments += "--configuration", $Configuration $Arguments += "--runtime", $Runtime - $script:Output = [IO.Path]::Combine($Top, "bin", $Configuration, $Framework, $Runtime, $Executable) + + # FullCLR only builds a library, so there is no runtime component + if ($FullCLR) { + $script:Output = [IO.Path]::Combine($Top, "bin", $Configuration, $Framework, $Executable) + } else { + $script:Output = [IO.Path]::Combine($Top, "bin", $Configuration, $Framework, $Runtime, $Executable) + } Write-Verbose "script:Output is $script:Output" # handle Restore @@ -164,21 +170,18 @@ function Start-PSBuild { } } elseif ($FullCLR) { log "Start building native powershell.exe" - $build = "$PSScriptRoot/build" - if ($Clean) { - Remove-Item -Force -Recurse $build -ErrorAction SilentlyContinue - } - mkdir $build -ErrorAction SilentlyContinue try { - Push-Location $build + Push-Location .\src\powershell-native if ($cmakeGenerator) { - cmake -G $cmakeGenerator ..\src\powershell-native + cmake -G $cmakeGenerator . } else { - cmake ..\src\powershell-native + cmake . } + msbuild powershell.vcxproj /p:Configuration=$msbuildConfiguration + } finally { Pop-Location } diff --git a/appveyor.yml b/appveyor.yml index ca3ac5a31..49c48df32 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -45,7 +45,7 @@ test_script: (New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path $testResultsFile)) # # FullCLR - $env:FullOutput = "$pwd\src\Microsoft.PowerShell.ConsoleHost\bin\Debug\net451\win81-x64" + $env:FullOutput = "$pwd\src\Microsoft.PowerShell.ConsoleHost\bin\Debug\net451" Write-Host -Foreground Green 'Run FullCLR tests' $testResultsFileFullCLR = "$pwd\TestsResults.FullCLR.xml" Start-DevPSGitHub -binDir $env:FullOutput -NoNewWindow -ArgumentList '-command', "Import-Module .\src\Modules\Pester; Import-Module .\bin\Modules\Microsoft.PowerShell.Platform; Invoke-Pester test/fullCLR -OutputFormat NUnitXml -OutputFile $testResultsFileFullCLR"