Permalink
Browse files

Use Arcade testing targets (#30330)

* Use Arcade testing targets

* Skip CodeStyle tests on Mono

* Include net472 in test target frameworks for Mono

* Remove incorrect file existence check.

* Update ADO integration test yaml
  • Loading branch information...
tmat committed Dec 3, 2018
1 parent 5a95c40 commit 2f345d03c9a549eccd820b1f3f33cae05d275864
Showing with 465 additions and 325 deletions.
  1. +4 −4 azure-pipelines-integration.yml
  2. +3 −3 azure-pipelines-official.yml
  3. +22 −15 azure-pipelines.yml
  4. +1 −1 build.sh
  5. +0 −5 build/Defaults/Desktop/app.config
  6. +0 −5 build/Defaults/Portable/app.config
  7. +0 −1 build/Targets/BeforeCommonTargets.targets
  8. +4 −4 build/Targets/Imports.targets
  9. +6 −2 build/Targets/Packages.props
  10. +1 −0 build/Targets/RepoToolset/Imports.targets
  11. +9 −2 build/Targets/RepoToolset/RepoLayout.props
  12. +49 −0 build/Targets/RepoToolset/Tests.props
  13. +78 −0 build/Targets/RepoToolset/Tests.targets
  14. +15 −0 build/Targets/RepoToolset/XUnit/XUnit.props
  15. +123 −0 build/Targets/RepoToolset/XUnit/XUnit.targets
  16. +3 −0 build/Targets/RepoToolset/XUnit/xunit.runner.json
  17. +3 −47 build/Targets/Roslyn.Toolsets.Xunit.targets
  18. +14 −1 build/Targets/Settings.props
  19. +5 −0 build/config/xunit.runner.json
  20. +4 −42 build/scripts/build.ps1
  21. +9 −6 build/scripts/build.sh
  22. +0 −133 build/scripts/tests.sh
  23. +3 −0 src/CodeStyle/CSharp/Tests/Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests.csproj
  24. +3 −0 src/CodeStyle/VisualBasic/Tests/Microsoft.CodeAnalysis.VisualBasic.CodeStyle.UnitTests.vbproj
  25. +6 −0 src/Compilers/CSharp/Test/Symbol/Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests.csproj
  26. +4 −0 src/Compilers/CSharp/Test/WinRT/Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests.csproj
  27. +1 −0 src/Compilers/Core/CodeAnalysisTest/Microsoft.CodeAnalysis.UnitTests.csproj
  28. +3 −0 src/Compilers/Core/MSBuildTaskTests/Microsoft.Build.Tasks.CodeAnalysis.UnitTests.csproj
  29. +6 −0 src/Compilers/Server/VBCSCompilerTests/VBCSCompiler.UnitTests.csproj
  30. +6 −0 ...lers/VisualBasic/Test/CommandLine/Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests.vbproj
  31. +6 −3 src/Compilers/VisualBasic/Test/Emit/Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests.vbproj
  32. +12 −0 src/Compilers/VisualBasic/Test/Semantic/Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests.vbproj
  33. +3 −0 src/Compilers/VisualBasic/Test/Symbol/Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests.vbproj
  34. +1 −0 src/Scripting/VisualBasicTest/Microsoft.CodeAnalysis.VisualBasic.Scripting.UnitTests.vbproj
  35. +2 −4 src/Test/Utilities/Portable/Roslyn.Test.Utilities.csproj
  36. +3 −3 src/Tools/Source/RunTests/AssemblyScheduler.cs
  37. +8 −6 src/Tools/Source/RunTests/Cache/CachingTestExecutor.cs
  38. +0 −2 src/Tools/Source/RunTests/Constants.cs
  39. +6 −7 src/Tools/Source/RunTests/ITestExecutor.cs
  40. +16 −5 src/Tools/Source/RunTests/Options.cs
  41. +15 −16 src/Tools/Source/RunTests/ProcessTestExecutor.cs
  42. +4 −4 src/Tools/Source/RunTests/Program.cs
  43. +1 −1 src/Tools/Source/RunTests/TestRunner.cs
  44. +0 −1 src/VisualStudio/Core/Test.Next/Roslyn.VisualStudio.Next.UnitTests.csproj
  45. +0 −1 src/VisualStudio/Core/Test/Microsoft.VisualStudio.LanguageServices.UnitTests.vbproj
  46. +0 −1 src/VisualStudio/TestUtilities2/Microsoft.VisualStudio.LanguageServices.Test.Utilities2.vbproj
  47. +3 −0 src/Workspaces/CoreTestUtilities/Roslyn.Services.UnitTests.Utilities.csproj
@@ -17,10 +17,10 @@ phases:
- task: PublishTestResults@1
inputs:
testRunner: XUnit
testResultsFiles: '**/xUnitResults/*.xml'
testResultsFiles: $(Build.SourcesDirectory)\Binaries\TestResults\$(_configuration)\*.xml
mergeTestResults: true
testRunTitle: 'Windows Visual Studio Integration $(_configuration)'
condition: succeededOrFailed()
condition: always()

- task: PublishBuildArtifacts@1
displayName: Publish Logs
@@ -29,7 +29,7 @@ phases:
ArtifactName: 'Windows Visual Studio Integration $(_configuration)'
publishLocation: Container
continueOnError: true
condition: or(failed(), canceled())
condition: not(succeeded())

- task: PublishBuildArtifacts@1
displayName: Publish Screenshots
@@ -38,4 +38,4 @@ phases:
ArtifactName: 'Screenshots $(_configuration)'
publishLocation: Container
continueOnError: true
condition: or(failed(), canceled())
condition: not(succeeded())
@@ -132,7 +132,7 @@ steps:
displayName: Publish Test Results
inputs:
testRunner: XUnit
testResultsFiles: '**/xUnitResults/*.xml'
testResultsFiles: '$(Build.SourcesDirectory)\Binaries\TestResults\$(BuildConfiguration)\*.xml'
mergeTestResults: true
testRunTitle: 'Unit Tests'
condition: succeededOrFailed()
@@ -160,7 +160,7 @@ steps:
# the proper entries in the build log so that the insertion tool can find the drop that
# needs to get published
- task: PublishBuildArtifacts@1
displayName: Publish Drop - Binaries
displayName: Publish Drop - DevDivInsertionFiles
inputs:
PathtoPublish: 'Binaries\$(BuildConfiguration)\DevDivInsertionFiles'
ArtifactName: '$(Build.BuildNumber)'
@@ -172,7 +172,7 @@ steps:

# Archive the files from the build necessary for future investigations
- task: PowerShell@2
displayName: Publish Drop - Binaries Real
displayName: Publish Drop - Binaries
inputs:
arguments: '-Source Binaries\$(BuildConfiguration) -Target $(DropRoot)\Roslyn-Signed\$(Build.SourceBranchName)\$(BuildConfiguration)\$(Build.BuildNumber) -ParallelCount 8 -Exclude UnitTests,PerfTests'
filePath: 'build\scripts\vsts-robocopy.ps1'
@@ -25,18 +25,19 @@ phases:
- task: PublishTestResults@1
inputs:
testRunner: XUnit
testResultsFiles: '**/xUnitResults/*.xml'
testResultsFiles: '$(Build.SourcesDirectory)\Binaries\TestResults\$(_configuration)\*.xml'
mergeTestResults: true
testRunTitle: 'Windows Desktop $(_configuration) $(_testKind)'
condition: succeededOrFailed()
condition: always()

- task: PublishBuildArtifacts@1
displayName: Publish Logs
inputs:
PathtoPublish: '$(Build.SourcesDirectory)\Binaries\$(_configuration)\Logs'
ArtifactName: 'Windows Desktop $(_configuration) $(_testKind)'
publishLocation: Container
continueOnError: true
condition: failed()
condition: not(succeeded())

- phase: Windows_Desktop_Spanish_Unit_Tests
queue:
@@ -81,19 +82,20 @@ phases:
- task: PublishTestResults@1
inputs:
testRunner: XUnit
testResultsFiles: '**/xUnitResults/*.xml'
testResultsFiles: '$(Build.SourcesDirectory)\Binaries\TestResults\$(_configuration)\*.xml'
mergeTestResults: true
testRunTitle: 'Windows CoreClr $(_configuration)'
condition: succeededOrFailed()
condition: always()

- task: PublishBuildArtifacts@1
displayName: Publish Logs
inputs:
PathtoPublish: '$(Build.SourcesDirectory)\Binaries\$(_configuration)\Logs'
ArtifactName: 'Windows CoreClr $(_configuration)'
publishLocation: Container
continueOnError: true
condition: failed()
condition: not(succeeded())

- phase: Windows_Determinism_Test
queue:
name: dotnet-external-temp
@@ -103,12 +105,13 @@ phases:
displayName: Build - Validate determinism

- task: PublishBuildArtifacts@1
displayName: Publish Logs
inputs:
PathtoPublish: '$(Build.SourcesDirectory)\Binaries\Debug\Logs'
ArtifactName: 'Build Determinism Files'
publishLocation: Container
continueOnError: true
condition: failed()
condition: not(succeeded())

- phase: Windows_Correctness_Test
queue:
@@ -119,25 +122,28 @@ phases:
displayName: Build - Validate correctness

- task: PublishBuildArtifacts@1
displayName: Publish Logs
inputs:
PathtoPublish: '$(Build.SourcesDirectory)\Binaries\Release\Logs'
ArtifactName: 'Build Correctness Files'
publishLocation: Container
continueOnError: true
condition: failed()
condition: not(succeeded())

- phase: Linux_Test
queue:
name: DotNetCore-Linux
name: DotNetCore-Linux
timeoutInMinutes: 90
parallel: 2
matrix:
coreclr:
_args: --configuration Debug
_name: CoreClr
_name: CoreClr
_configuration: Debug
mono:
_args: --configuration Debug --docker --mono
_name: Mono
_configuration: Debug
steps:
- script: ./build/scripts/cibuild.sh $(_args)
displayName: Build and Test
@@ -147,16 +153,17 @@ phases:
- task: PublishTestResults@1
inputs:
testRunner: XUnit
testResultsFiles: '**/xUnitResults/*.xml'
testResultsFiles: '$(Build.SourcesDirectory)/Binaries/TestResults/$(_configuration)/*.xml'
mergeTestResults: true
testRunTitle: 'Linux $(_name)'
condition: succeededOrFailed()
condition: always()

- task: PublishBuildArtifacts@1
displayName: Publish Logs
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/Binaries/Debug/Logs'
ArtifactName: 'Linux $(_name)'
publishLocation: Container
continueOnError: true
condition: failed()
condition: not(succeeded())

@@ -13,4 +13,4 @@ while [[ -h $source ]]; do
done

scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
"$scriptroot/build/scripts/build.sh" $@
"$scriptroot/build/scripts/build.sh" $@
@@ -2,11 +2,6 @@

<!-- The default app.config for test projects that do not specify one -->
<configuration>
<appSettings>
<add key="xunit.diagnosticMessages" value="false"/>
<add key="xunit.parallelizeTestCollections" value="false"/>
<add key="xunit.shadowCopy" value="false"/> <!-- Set shadow copy to false so that the VS Test Explorer can properly load our public signed binaries -->
</appSettings>
<system.diagnostics>
<trace>
<listeners>
@@ -2,11 +2,6 @@

<!-- The default app.config for desktop portable test projects that do not specify one -->
<configuration>
<appSettings>
<add key="xunit.diagnosticMessages" value="false"/>
<add key="xunit.parallelizeTestCollections" value="false"/>
<add key="xunit.shadowCopy" value="false"/> <!-- Set shadow copy to false so that the VS Test Explorer can properly load our public signed binaries -->
</appSettings>
<system.diagnostics>
<trace>
<listeners>
@@ -9,7 +9,6 @@
<Choose>
<When Condition="'$(RoslynProjectType)' == 'UnitTest' OR '$(RoslynProjectType)' == 'UnitTestPortable'">
<PropertyGroup>
<_IsAnyUnitTest>true</_IsAnyUnitTest>
<OutputPath>$(OutputPath)UnitTests\$(MSBuildProjectName)\</OutputPath>
<IsShipping>false</IsShipping>
</PropertyGroup>
@@ -8,7 +8,7 @@

<Import Project="RepoToolset\Imports.targets" />
<Import Project="VisualStudio.targets"/>
<Import Project="Roslyn.Toolsets.Xunit.targets" Condition="'$(_IsAnyUnitTest)' == 'true'" />
<Import Project="Roslyn.Toolsets.Xunit.targets" Condition="'$(IsTestProject)' == 'true'" />

<PropertyGroup>
<FileAlignment>512</FileAlignment>
@@ -41,14 +41,14 @@
</PropertyGroup>

<!-- Add the UnitTestContainer project capability -->
<ItemGroup Condition="'$(_IsAnyUnitTest)' == 'true'">
<ItemGroup Condition="'$(IsTestProject)' == 'true'">
<ProjectCapability Include="UnitTestContainer" />
</ItemGroup>

<!--
Do not copy dependencies to the output directory of a library project, unless it's a unit test project.
-->
<ItemDefinitionGroup Condition="'$(OutputType)' == 'Library' and '$(IsVsixProject)' != 'true' and '$(_IsAnyUnitTest)' != 'true'">
<ItemDefinitionGroup Condition="'$(OutputType)' == 'Library' and '$(IsVsixProject)' != 'true' and '$(IsTestProject)' != 'true'">
<Reference>
<Private>False</Private>
</Reference>
@@ -58,7 +58,7 @@
</ProjectReference>
</ItemDefinitionGroup>

<PropertyGroup Condition="'$(ProduceReferenceAssembly)' == '' and (('$(OutputType)' == 'Library' and '$(IsVsixProject)' != 'true' and '$(_IsAnyUnitTest)' != 'true') or '$(OutputType)' == 'Exe' or '$(OutputType)' == 'WinExe')">
<PropertyGroup Condition="'$(ProduceReferenceAssembly)' == '' and (('$(OutputType)' == 'Library' and '$(IsVsixProject)' != 'true' and '$(IsTestProject)' != 'true') or '$(OutputType)' == 'Exe' or '$(OutputType)' == 'WinExe')">
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
</PropertyGroup>

@@ -93,6 +93,7 @@
<MicrosoftServiceHubClientVersion>1.3.23</MicrosoftServiceHubClientVersion>
<MicrosoftSourceLinkVersion>1.0.0-beta-63201-01</MicrosoftSourceLinkVersion>
<MicrosoftSymbolUploaderBuildTaskVersion>1.0.0-beta-63008-01</MicrosoftSymbolUploaderBuildTaskVersion>
<MicrosoftNETTestSdkVersion>15.9.0-dev2</MicrosoftNETTestSdkVersion>
<MicrosoftTplDataflowVersion>4.5.24</MicrosoftTplDataflowVersion>
<MicrosoftVisualBasicVersion>10.1.0</MicrosoftVisualBasicVersion>
<MicrosoftVisualStudioCallHierarchyPackageDefinitionsVersion>15.8.27812-alpha</MicrosoftVisualStudioCallHierarchyPackageDefinitionsVersion>
@@ -205,10 +206,12 @@
<XliffTasksVersion>0.2.0-beta-63004-01</XliffTasksVersion>
<xunitVersion>2.4.1-pre.build.4059</xunitVersion>
<xunitanalyzersVersion>0.10.0</xunitanalyzersVersion>
<xunitassertVersion>2.4.1-pre.build.4059</xunitassertVersion>
<xunitassertVersion>$(xunitVersion)</xunitassertVersion>
<xunitextensibilitycoreVersion>$(xunitVersion)</xunitextensibilitycoreVersion>
<xunitrunnerconsoleVersion>2.4.1-pre.build.4059</xunitrunnerconsoleVersion>
<xunitrunnerwpfVersion>1.0.51</xunitrunnerwpfVersion>
<xunitrunnervisualstudioVersion>2.4.1-pre.build.4059</xunitrunnervisualstudioVersion>
<xunitrunnervisualstudioVersion>$(xunitVersion)</xunitrunnervisualstudioVersion>
<xunitextensibilityexecutionVersion>$(xunitVersion)</xunitextensibilityexecutionVersion>

<!--
The CodeStyle layer depends on a prior stable release of the CodeAnalysis assemblies so the NuGet packages
@@ -294,6 +297,7 @@
<UsingToolNuGetRepack>true</UsingToolNuGetRepack>
<UsingToolVSSDK>true</UsingToolVSSDK>
<UsingToolNetFrameworkReferenceAssemblies>true</UsingToolNetFrameworkReferenceAssemblies>
<UsingToolXUnit>true</UsingToolXUnit>
</PropertyGroup>

<PropertyGroup>
@@ -29,6 +29,7 @@
<Import Project="Workarounds.targets"/>
<Import Project="RepositoryInfo.targets"/>
<Import Project="Version.targets"/>
<Import Project="Tests.targets"/>

<Import Project="Localization.targets" />
<Import Project="VisualStudio.targets" Condition="'$(UsingToolVSSDK)' == 'true' and '$(DesignTimeBuild)' != 'true' and '$(BuildingForLiveUnitTesting)' != 'true' and '$(MSBuildRuntimeType)' != 'Core'"/>
@@ -7,6 +7,8 @@

<PropertyGroup>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">AnyCPU</Platform>
<PlatformName Condition="'$(PlatformName)' == ''">$(Platform)</PlatformName>
</PropertyGroup>

<PropertyGroup>
@@ -16,12 +18,12 @@
<NuGetPackageRoot Condition="'$(NuGetPackageRoot)' == '' AND '$(OS)' != 'Windows_NT'">$(HOME)/.nuget/packages/</NuGetPackageRoot>
<NuGetPackageRoot Condition="!HasTrailingSlash('$(NuGetPackageRoot)')">$(NuGetPackageRoot)\</NuGetPackageRoot>
</PropertyGroup>

<PropertyGroup>
<RepoRoot Condition="'$(RepoRoot)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'global.json'))\</RepoRoot>
</PropertyGroup>

<PropertyGroup>
<PropertyGroup Condition="'$(DotNetTool)' == ''">
<!-- Respect environment variable for the .NET install directory if set; otherwise, use the repo default location -->
<_DotNetRoot>$(DOTNET_INSTALL_DIR)</_DotNetRoot>
<_DotNetRoot Condition="'$(_DotNetRoot)' == ''">$(RepoRoot).dotnet\</_DotNetRoot>
@@ -33,6 +35,10 @@
<DotNetTool Condition="'$(OS)' == 'Windows_NT'">$(_DotNetRoot)dotnet.exe</DotNetTool>
<DotNetTool Condition="'$(OS)' != 'Windows_NT'">$(_DotNetRoot)dotnet</DotNetTool>
</PropertyGroup>

<PropertyGroup Condition="'$(MonoTool)' == ''">
<MonoTool>mono</MonoTool>
</PropertyGroup>

<PropertyGroup>
<!--
@@ -49,6 +55,7 @@
<ArtifactsConfigurationDir>$(ArtifactsDir)$(Configuration)\</ArtifactsConfigurationDir>
<ArtifactsSymStoreDirectory>$(ArtifactsConfigurationDir)SymStore\</ArtifactsSymStoreDirectory>
<ArtifactsTmpDir>$(ArtifactsConfigurationDir)tmp\</ArtifactsTmpDir>
<ArtifactsTestResultsDir>$(ArtifactsDir)TestResults\$(Configuration)\</ArtifactsTestResultsDir>
<ArtifactsLogDir>$(ArtifactsConfigurationDir)Logs\</ArtifactsLogDir>
<ArtifactsPackagesDir>$(ArtifactsConfigurationDir)NuGet\</ArtifactsPackagesDir>
<ArtifactsShippingPackagesDir>$(ArtifactsPackagesDir)Shipping\</ArtifactsShippingPackagesDir>
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- All Rights Reserved. Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
<Project>

<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>

<PropertyGroup Condition="'$(IsPerformanceTestProject)' == ''">
<IsPerformanceTestProject>false</IsPerformanceTestProject>
<IsPerformanceTestProject Condition="$(MSBuildProjectName.EndsWith('.PerformanceTests'))">true</IsPerformanceTestProject>
</PropertyGroup>

<PropertyGroup Condition="'$(IsIntegrationTestProject)' == ''">
<IsIntegrationTestProject>false</IsIntegrationTestProject>
<IsIntegrationTestProject Condition="$(MSBuildProjectName.EndsWith('.IntegrationTests'))">true</IsIntegrationTestProject>
</PropertyGroup>

<PropertyGroup Condition="'$(IsUnitTestProject)' == ''">
<IsUnitTestProject>false</IsUnitTestProject>
<IsUnitTestProject Condition="$(MSBuildProjectName.EndsWith('.UnitTests')) or $(MSBuildProjectName.EndsWith('.Tests'))">true</IsUnitTestProject>
</PropertyGroup>

<PropertyGroup>
<IsTestProject>false</IsTestProject>
<IsTestProject Condition="'$(IsUnitTestProject)' == 'true' or '$(IsIntegrationTestProject)' == 'true' or '$(IsPerformanceTestProject)' == 'true'">true</IsTestProject>

<!-- Disable building Integration Test projects in LUT. -->
<BuildForLiveUnitTesting Condition="'$(BuildForLiveUnitTesting)' == '' and '$(IsIntegrationTestProject)' == 'true'">false</BuildForLiveUnitTesting>
</PropertyGroup>

<ItemGroup Condition="'$(IsTestProject)' == 'true'">
<!-- VS TestExplorer uses this to identify a test project -->
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />

<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNETTestSdkVersion)" IsImplicitlyDefined="true" />
</ItemGroup>

<PropertyGroup Condition="'$(IsTestProject)' == 'true'">
<!-- Treat test assemblies as non-shipping (do not publish or sign them). -->
<IsShipping Condition="'$(IsShipping)' == ''">false</IsShipping>

<!-- Default test runner -->
<TestRunnerName Condition="'$(UsingToolXUnit)' == 'true'">XUnit</TestRunnerName>
</PropertyGroup>

<!-- Import specialized props files of supported test runners -->
<Import Project="$(MSBuildThisFileDirectory)$(TestRunnerName)\$(TestRunnerName).props" Condition="'$(TestRunnerName)' != '' and Exists('$(MSBuildThisFileDirectory)$(TestRunnerName)\$(TestRunnerName).props')"/>
</Project>
Oops, something went wrong.

0 comments on commit 2f345d0

Please sign in to comment.