Skip the parser tests that are run by 'ShouldBeParseError' in Travis Full Build (#3479)

This commit is contained in:
Dongbo Wang 2017-04-04 09:23:51 -07:00 committed by GitHub
parent a79cb2ffd2
commit 3be547c78e
2 changed files with 25 additions and 3 deletions

View file

@ -11,11 +11,15 @@ try {
# 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
# build to avoid a hang.
# Note: this change should be reverted once the 'CrossGen' issue is fixed by CoreCLR.
# 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'
$defaultParamValues = $PSdefaultParameterValues.Clone()
$PSDefaultParameterValues["it:skip"] = (!$IsWindows -and $isFullBuild)
$IsSkipped = (!$IsWindows -and $isFullBuild)
$PSDefaultParameterValues["it:skip"] = $IsSkipped
$PSDefaultParameterValues["ShouldBeParseError:SkipInTravisFullBuild"] = $IsSkipped
Describe 'Positive Parse Properties Tests' -Tags "CI" {
It 'PositiveParsePropertiesTest' {

View file

@ -65,9 +65,27 @@ function ShouldBeParseError
# This is a temporary solution after moving type creation from parse time to runtime
[switch]$SkipAndCheckRuntimeError,
# for test coverarage purpose, tests validate columnNumber or offset
[switch]$CheckColumnNumber
[switch]$CheckColumnNumber,
# Skip this test in Travis CI nightly build
[switch]$SkipInTravisFullBuild
)
#
# CrossGen'ed assemblies cause a hang to happen when running tests with this helper function 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
# 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
#
if ($SkipInTravisFullBuild) {
## Report that we skipped the test and return
It "Parse error expected: <<$src>>" -Skip {}
return
}
Context "Parse error expected: <<$src>>" {
# Test case error if this fails
$expectedErrors.Count | Should Be $expectedOffsets.Count