Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ try {
# CrossGen'ed assemblies cause a hang to happen intermittently when running this test suite in Linux and OSX.
# The issue has been reported to CoreCLR team. We need to work around it for now with the following approach:
# 1. For pull request and push commit, build without '-CrossGen' and run the parsing tests
# 2. For nightly build, build with '-CrossGen' but don't run the parsing tests
# In this way, we will continue to exercise these parsing tests for each CI build, and skip them for nightly
# 2. For daily build, build with '-CrossGen' but don't run the parsing tests
# In this way, we will continue to exercise these parsing tests for each CI build, and skip them for daily
# build to avoid a hang.
# Note: this change should be reverted once the 'CrossGen' issue is fixed by CoreCLR. The issue is tracked by
# https://github.com/dotnet/coreclr/issues/9745
#
$isFullBuild = $env:TRAVIS_EVENT_TYPE -eq 'cron' -or $env:TRAVIS_EVENT_TYPE -eq 'api'
$isDailyBuild = $env:TRAVIS_EVENT_TYPE -eq 'cron' -or $env:TRAVIS_EVENT_TYPE -eq 'api'
$defaultParamValues = $PSdefaultParameterValues.Clone()
$IsSkipped = (!$IsWindows -and $isFullBuild)
$IsSkipped = (!$IsWindows -and $isDailyBuild)
$PSDefaultParameterValues["it:skip"] = $IsSkipped
$PSDefaultParameterValues["ShouldBeParseError:SkipInTravisFullBuild"] = $IsSkipped

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@
# Copyright (c) Microsoft Corporation, 2015
#

try {
#
# CrossGen'ed assemblies cause a hang to happen intermittently when running this test suite in Linux and OSX.
# The issue has been reported to CoreCLR team. We need to work around it for now with the following approach:
# 1. For pull request and push commit, build without '-CrossGen' and run the parsing tests
# 2. For daily build, build with '-CrossGen' but don't run the parsing tests
# In this way, we will continue to exercise these parsing tests for each CI build, and skip them for daily
# build to avoid a hang.
# Note: this change should be reverted once the 'CrossGen' issue is fixed by CoreCLR. The issue is tracked by
# https://github.com/dotnet/coreclr/issues/9745
#
$isDailyBuild = $env:TRAVIS_EVENT_TYPE -eq 'cron' -or $env:TRAVIS_EVENT_TYPE -eq 'api'
$defaultParamValues = $PSdefaultParameterValues.Clone()
$IsSkipped = (!$IsWindows -and $isDailyBuild)
$PSDefaultParameterValues["it:skip"] = $IsSkipped
$PSDefaultParameterValues["ShouldBeParseError:SkipInTravisFullBuild"] = $IsSkipped


Describe 'Classes inheritance syntax' -Tags "CI" {

It 'Base types' {
Expand Down Expand Up @@ -521,3 +539,7 @@ class Derived : Base
$sb.Invoke() | Should Be 200
}
}

} finally {
$global:PSdefaultParameterValues = $defaultParamValues
}
11 changes: 7 additions & 4 deletions tools/travis.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ else


# Run a full build if the build was trigger via cron, api or the commit message contains `[Feature]`
$isFullBuild = $env:TRAVIS_EVENT_TYPE -eq 'cron' -or $env:TRAVIS_EVENT_TYPE -eq 'api' -or $commitMessage -match '\[feature\]'
$hasFeatureTag = $commitMessage -match '\[feature\]'
$isDailyBuild = $env:TRAVIS_EVENT_TYPE -eq 'cron' -or $env:TRAVIS_EVENT_TYPE -eq 'api'
$isFullBuild = $isDailyBuild -or $hasFeatureTag

if($Bootstrap.IsPresent)
{
Expand Down Expand Up @@ -140,7 +142,8 @@ else
$originalProgressPreference = $ProgressPreference
$ProgressPreference = 'SilentlyContinue'
try {
Start-PSBuild -CrossGen:$isFullBuild -PSModuleRestore
## We use CrossGen build to run tests only if it's the daily build.
Start-PSBuild -CrossGen:$isDailyBuild -PSModuleRestore
}
finally{
$ProgressPreference = $originalProgressPreference
Expand All @@ -167,7 +170,7 @@ else
if (-not $isPr) {
# Run 'CrossGen' for push commit, so that we can generate package.
# It won't rebuild powershell, but only CrossGen the already built assemblies.
if (-not $isFullBuild) { Start-PSBuild -CrossGen }
if (-not $isDailyBuild) { Start-PSBuild -CrossGen }

$packageParams = @{}
if($env:TRAVIS_BUILD_NUMBER)
Expand Down Expand Up @@ -196,7 +199,7 @@ else
$resultError = $_
$result = "FAIL"
}
if ( $isFullBuild ) {
if ( $isDailyBuild ) {
# now update the badge if you've done a full build, these are not fatal issues
try {
$svgData = Get-DailyBadge -result $result
Expand Down