Fix FullCLR build script for build instead of publish

This commit is contained in:
Andrew Schwartzmeyer 2016-04-01 23:09:39 -07:00
parent 4a7a521077
commit a6fd5c70d9
2 changed files with 13 additions and 10 deletions

View File

@ -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
}

View File

@ -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"