Skip to content

Commit

Permalink
Fix Ubuntu Appveyor build (#1320)
Browse files Browse the repository at this point in the history
* try fix appveyor ubuntu build

* temporarily enable only ubuntu

* remove redundant linux customisation

* fix compatibility analyser build

* final tweak to make it ready for PR

* Update tools/appveyor.psm1

Co-Authored-By: Robert Holt <[email protected]>
  • Loading branch information
2 people authored and JamesWTruher committed Aug 27, 2019
1 parent 3351367 commit 5cd3065
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
10 changes: 9 additions & 1 deletion PSCompatibilityCollector/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,15 @@ function Invoke-CrossCompatibilityModuleBuild
Push-Location $script:BinModSrcDir
try
{
dotnet publish -f $Framework -c $Configuration
if ( Test-Path "$HOME/.dotnet/dotnet" )
{
$dotnet = "$HOME/.dotnet/dotnet"
}
else
{
$dotnet = "dotnet"
}
& $dotnet publish --framework $Framework --configuration $Configuration
}
finally
{
Expand Down
8 changes: 0 additions & 8 deletions Tests/Engine/CustomizedRule.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,6 @@ Describe "Test importing correct customized rules" {
It "will show the custom rules when given a glob" {
# needs fixing for Linux
$expectedNumRules = 4
if ($IsLinux)
{
$expectedNumRules = 3
}
$customizedRulePath = Get-ScriptAnalyzerRule -CustomizedRulePath $directory\samplerule\samplerule* | Where-Object {$_.RuleName -match $measure}
$customizedRulePath.Count | Should -Be $expectedNumRules
}
Expand All @@ -113,10 +109,6 @@ Describe "Test importing correct customized rules" {
It "will show the custom rules when given glob with recurse switch" {
# needs fixing for Linux
$expectedNumRules = 5
if ($IsLinux)
{
$expectedNumRules = 4
}
$customizedRulePath = Get-ScriptAnalyzerRule -RecurseCustomRulePath -CustomizedRulePath $directory\samplerule\samplerule* | Where-Object {$_.RuleName -eq $measure}
$customizedRulePath.Count | Should -Be $expectedNumRules
}
Expand Down
1 change: 1 addition & 0 deletions tools/appveyor.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ function Invoke-AppVeyorInstall {
Write-Verbose "& $buildScriptDir/build.ps1 -bootstrap"
$buildScriptDir = (Resolve-Path "$PSScriptRoot/..").Path
& "$buildScriptDir/build.ps1" -bootstrap
$Global:LASTEXITCODE = $LASTEXITCODE = 0 # needed to avoid a premature abortion of the AppVeyor Ubuntu build
}

# Implements AppVeyor 'test_script' step
Expand Down

0 comments on commit 5cd3065

Please sign in to comment.