From f14e4003491a0ce207c6345a626422cc6ce52178 Mon Sep 17 00:00:00 2001 From: Michael Simons Date: Fri, 17 Dec 2021 14:30:05 -0600 Subject: [PATCH] Exclude omnisharp tests from CentOS 7 CI (#12858) * Exclude omnisharp tests from CentOS 7 CI * Update src/SourceBuild/Arcade/eng/common/templates/steps/source-build-build-tarball.yml Co-authored-by: Chris Rummel Co-authored-by: Chris Rummel --- .../templates/job/source-build-run-tarball-build.yml | 6 ++++++ .../templates/steps/source-build-build-tarball.yml | 5 ++++- src/SourceBuild/tarball/content/smoke-test.sh | 9 ++++++++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml b/src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml index 47aa5bfb6..28648866d 100644 --- a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml +++ b/src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml @@ -41,27 +41,32 @@ jobs: _BootstrapPrep: true _BuildArch: x64 _Container: ${{ parameters.centOS7Container }} + _ExcludeOmniSharpTests: true _RunOnline: true CentOS7-Offline: _BootstrapPrep: true _BuildArch: x64 _Container: ${{ parameters.centOS7Container }} + _ExcludeOmniSharpTests: true _RunOnline: false ${{ if ne(variables['Build.Reason'], 'PullRequest') }}: CentOS8-Offline: _BootstrapPrep: true _BuildArch: x64 _Container: ${{ parameters.centOS8Container }} + _ExcludeOmniSharpTests: false _RunOnline: false Fedora33-Offline: _BootstrapPrep: false _BuildArch: x64 _Container: ${{ parameters.fedora33Container }} + _ExcludeOmniSharpTests: false _RunOnline: false Ubuntu1804-Offline: _BootstrapPrep: true _BuildArch: x64 _Container: ${{ parameters.ubuntu1804Container }} + _ExcludeOmniSharpTests: false _RunOnline: false timeoutInMinutes: 300 workspace: @@ -74,6 +79,7 @@ jobs: parameters: buildArch: $(_BuildArch) container: $(_Container) + excludeOmniSharpTests: $(_ExcludeOmniSharpTests) prepScript: | set -x diff --git a/src/SourceBuild/Arcade/eng/common/templates/steps/source-build-build-tarball.yml b/src/SourceBuild/Arcade/eng/common/templates/steps/source-build-build-tarball.yml index 8175b1a73..2891bdc13 100644 --- a/src/SourceBuild/Arcade/eng/common/templates/steps/source-build-build-tarball.yml +++ b/src/SourceBuild/Arcade/eng/common/templates/steps/source-build-build-tarball.yml @@ -10,6 +10,9 @@ parameters: # Container image to build within container: null + # Skip running the OmniSharp smoke-tests + excludeOmniSharpTests: false + # Script logic to prep the tarball for building prepScript: null @@ -63,7 +66,7 @@ steps: - script: | set -x - docker run --rm -v ${{ parameters.tarballDir }}:/tarball -w /tarball ${{ parameters.container }} ./build.sh --run-smoke-test ${{ parameters.additionalBuildArgs }} + docker run --rm -v ${{ parameters.tarballDir }}:/tarball -w /tarball -e excludeOmniSharpTests=${{ parameters.excludeOmniSharpTests}} ${{ parameters.container }} ./build.sh --run-smoke-test ${{ parameters.additionalBuildArgs }} displayName: Run Tests # Don't use CopyFiles@2 as it encounters permissions issues because it indexes all files in the source directory graph. diff --git a/src/SourceBuild/tarball/content/smoke-test.sh b/src/SourceBuild/tarball/content/smoke-test.sh index caa8017a8..a1c43673d 100755 --- a/src/SourceBuild/tarball/content/smoke-test.sh +++ b/src/SourceBuild/tarball/content/smoke-test.sh @@ -52,6 +52,7 @@ excludeWebNoHttpsTests=false excludeWebHttpsTests=false excludeLocalTests=false excludeOnlineTests=false +excludeOmniSharpTests=${excludeOmniSharpTests:-false} devCertsVersion="$DEV_CERTS_VERSION_DEFAULT" testingDir="$SCRIPT_ROOT/testing-smoke" cliDir="$testingDir/builtCli" @@ -81,6 +82,7 @@ function usage() { echo " --excludeWebHttpsTests don't run web project tests with https using dotnet-dev-certs" echo " --excludeLocalTests exclude tests that use local sources for nuget packages" echo " --excludeOnlineTests exclude test that use online sources for nuget packages" + echo " --excludeOmniSharpTests don't run the OmniSharp tests" echo " --devCertsVersion use dotnet-dev-certs instead of default $DEV_CERTS_VERSION_DEFAULT" echo " --prodConBlobFeedUrl override the prodcon blob feed specified in ProdConFeed.txt, removing it if empty" echo " --archiveRestoredPackages capture all restored packages to $archivedPackagesDir" @@ -139,6 +141,9 @@ while :; do --excludeonlinetests) excludeOnlineTests=true ;; + --excludeomnisharptests) + excludeOmniSharpTests=true + ;; --devcertsversion) shift devCertsVersion="$1" @@ -772,6 +777,8 @@ fi runXmlDocTests -runOmniSharpTests +if [ "$excludeOmniSharpTests" == "false" ]; then + runOmniSharpTests +fi echo "ALL TESTS PASSED!"