Skip the parser tests that are run by 'ShouldBeParseError' in Travis Full Build (#3479)
This commit is contained in:
parent
a79cb2ffd2
commit
3be547c78e
2 changed files with 25 additions and 3 deletions
|
@ -11,11 +11,15 @@ try {
|
||||||
# 2. For nightly build, build with '-CrossGen' but don't 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
|
# 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.
|
# 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'
|
$isFullBuild = $env:TRAVIS_EVENT_TYPE -eq 'cron' -or $env:TRAVIS_EVENT_TYPE -eq 'api'
|
||||||
$defaultParamValues = $PSdefaultParameterValues.Clone()
|
$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" {
|
Describe 'Positive Parse Properties Tests' -Tags "CI" {
|
||||||
It 'PositiveParsePropertiesTest' {
|
It 'PositiveParsePropertiesTest' {
|
||||||
|
|
|
@ -65,9 +65,27 @@ function ShouldBeParseError
|
||||||
# This is a temporary solution after moving type creation from parse time to runtime
|
# This is a temporary solution after moving type creation from parse time to runtime
|
||||||
[switch]$SkipAndCheckRuntimeError,
|
[switch]$SkipAndCheckRuntimeError,
|
||||||
# for test coverarage purpose, tests validate columnNumber or offset
|
# 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>>" {
|
Context "Parse error expected: <<$src>>" {
|
||||||
# Test case error if this fails
|
# Test case error if this fails
|
||||||
$expectedErrors.Count | Should Be $expectedOffsets.Count
|
$expectedErrors.Count | Should Be $expectedOffsets.Count
|
||||||
|
|
Loading…
Reference in a new issue