-
Notifications
You must be signed in to change notification settings - Fork 558
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for OperationContext/OperationContextScope flow through a…
…n await Fixed the ability to run tests in Visual Studio
- Loading branch information
Showing
18 changed files
with
528 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<RunSettings> | ||
<RunConfiguration> | ||
<!-- Timeout in ms, 5 minutes --> | ||
<TestSessionTimeout>300000</TestSessionTimeout> | ||
<!-- Directory for test run reports. E.g. trx, coverage etc. --> | ||
<ResultsDirectory>.\TestResults\</ResultsDirectory> | ||
<!-- Working directory for test invocation. Results directory can be relative to this. Used by IDEs. --> | ||
<SolutionDirectory>.\</SolutionDirectory> | ||
<!-- Degree of parallelization, spawns n test hosts to run tests. --> | ||
<MaxCpuCount>$$MAXCPUCOUNT$$</MaxCpuCount> | ||
<!-- If true, an adapter should disable any test case parallelization. --> | ||
<DisableParallelization>$$DISABLEPARALLELIZATION$$</DisableParallelization> | ||
<!-- If true, an adapter shouldn't create appdomains to run tests. --> | ||
<DisableAppDomain>$$DISABLEAPPDOMAIN$$</DisableAppDomain> | ||
<!-- Filter out failing (wrong framwork, platform, runtime or activeissue) tests --> | ||
<TestCaseFilter>$$TESTCASEFILTER$$</TestCaseFilter> | ||
<DotNetHostPath>$$DOTNETHOSTPATH$$</DotNetHostPath> | ||
<TargetFrameworkVersion>FrameworkCore10</TargetFrameworkVersion> | ||
</RunConfiguration> | ||
<LoggerRunSettings> | ||
<Loggers> | ||
<Logger friendlyName="trx" /> | ||
<Logger friendlyName="html" /> | ||
<Logger friendlyName="console"> | ||
<Configuration> | ||
<Verbosity>Minimal</Verbosity> | ||
</Configuration> | ||
</Logger> | ||
</Loggers> | ||
</LoggerRunSettings> | ||
<DataCollectionRunSettings> | ||
<DataCollectors> | ||
<!-- Enabling the code coverage data collector as a later task --> | ||
<!--<DataCollector friendlyName="XPlat code coverage" enabled="$$COVERAGE_ENABLED$$"> | ||
<Configuration> | ||
<Include>$$COVERAGE_INCLUDE$$</Include> | ||
<ExcludeByFile>$$COVERAGE_EXCLUDEBYFILE$$</ExcludeByFile> | ||
<IncludeDirectory>$$COVERAGE_INCLUDEDIRECTORY$$</IncludeDirectory> | ||
<Format>opencover</Format> | ||
<SingleHit>false</SingleHit> | ||
<UseSourceLink>true</UseSourceLink> | ||
<IncludeTestAssembly>false</IncludeTestAssembly> | ||
</Configuration> | ||
</DataCollector>--> | ||
<DataCollector friendlyName="blame" enabled="true" /> | ||
</DataCollectors> | ||
</DataCollectionRunSettings> | ||
</RunSettings> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<RunSettingsInputFilePath>$(MSBuildThisFileDirectory).runsettings</RunSettingsInputFilePath> | ||
<RunSettingsIntermediateOutputFilePath>$(ArtifactsObjDir)$(TargetOS)-$(Configuration)-$(TargetArchitecture).runsettings</RunSettingsIntermediateOutputFilePath> | ||
<RunSettingsAppOutputFilePath>$(OutDir).runsettings</RunSettingsAppOutputFilePath> | ||
|
||
<CreateIntermediateRunSettingsFile Condition="'$(CreateIntermediateRunSettingsFile)' == ''">false</CreateIntermediateRunSettingsFile> | ||
<RunSettingsOutputFilePath Condition="'$(CreateIntermediateRunSettingsFile)' == 'true'">$(RunSettingsIntermediateOutputFilePath)</RunSettingsOutputFilePath> | ||
<RunSettingsOutputFilePath Condition="'$(CreateIntermediateRunSettingsFile)' != 'true'">$(RunSettingsAppOutputFilePath)</RunSettingsOutputFilePath> | ||
|
||
<!-- Set RunSettingsFilePath property which is read by VSTest. --> | ||
<RunSettingsFilePath Condition="Exists('$(RunSettingsAppOutputFilePath)')">$(RunSettingsAppOutputFilePath)</RunSettingsFilePath> | ||
<!-- Use an intermediate runsettings file if the app hasn't been built yet to enable VSTest discovery. --> | ||
<RunSettingsFilePath Condition="'$(RunSettingsFilePath)' == '' and Exists('$(RunSettingsIntermediateOutputFilePath)')">$(RunSettingsIntermediateOutputFilePath)</RunSettingsFilePath> | ||
|
||
<PrepareForRunDependsOn>GenerateRunSettingsFile;$(PrepareForRunDependsOn)</PrepareForRunDependsOn> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<_testFilter Condition="'$(_withCategories)' != ''">$(_withCategories.Replace(';', '&amp;category='))</_testFilter> | ||
<_testFilter Condition="'$(_withoutCategories)' != ''">$(_testFilter)$(_withoutCategories.Replace(';', '&amp;category!='))</_testFilter> | ||
<_testFilter>$(_testFilter.Trim('&amp;'))</_testFilter> | ||
</PropertyGroup> | ||
|
||
<Target Name="GenerateRunSettingsFile" > | ||
<PropertyGroup> | ||
<RunSettingsFileContent>$([System.IO.File]::ReadAllText('$(RunSettingsInputFilePath)'))</RunSettingsFileContent> | ||
<RunSettingsFileContent Condition="'$(TestDisableParallelization)' == 'true'">$(RunSettingsFileContent.Replace('$$MAXCPUCOUNT$$', '1'))</RunSettingsFileContent> | ||
<RunSettingsFileContent Condition="'$(TestDisableParallelization)' != 'true'">$(RunSettingsFileContent.Replace('$$MAXCPUCOUNT$$', '0'))</RunSettingsFileContent> | ||
<!-- Arm64 is currently not a known TargetPlatform value in VSTEST: https://github.com/microsoft/vstest/issues/2566 --> | ||
<!-- | ||
<RunSettingsFileContent Condition="'$(TargetArchitecture)' != 'arm64'">$(RunSettingsFileContent.Replace('$$TARGETPLATFORM$$', '<TargetPlatform>$(TargetArchitecture)</TargetPlatform>'))</RunSettingsFileContent> | ||
<RunSettingsFileContent Condition="'$(TargetArchitecture)' == 'arm64'">$(RunSettingsFileContent.Replace('$$TARGETPLATFORM$$', ''))</RunSettingsFileContent> | ||
--> | ||
<RunSettingsFileContent>$(RunSettingsFileContent.Replace('$$COVERAGE_INCLUDE$$', '$(CoverageIncludeFilter)') | ||
.Replace('$$COVERAGE_EXCLUDEBYFILE$$', '$(CoverageExcludeByFileFilter)') | ||
.Replace('$$COVERAGE_INCLUDEDIRECTORY$$', '$(CoverageIncludeDirectoryFilter)') | ||
.Replace('$$COVERAGE_ENABLED$$', '$([MSBuild]::ValueOrDefault('$(Coverage)', 'false'))') | ||
.Replace('$$DISABLEPARALLELIZATION$$', '$([MSBuild]::ValueOrDefault('$(TestDisableParallelization)', 'false'))') | ||
.Replace('$$DISABLEAPPDOMAIN$$', '$([MSBuild]::ValueOrDefault('$(TestDisableAppDomain)', 'false'))') | ||
.Replace('$$TESTCASEFILTER$$', '$(_testFilter)') | ||
.Replace('$$DOTNETHOSTPATH$$', '$(TestHostRootPath)$([System.IO.Path]::GetFileName('$(DotNetTool)'))'))</RunSettingsFileContent> | ||
</PropertyGroup> | ||
|
||
<WriteLinesToFile File="$(RunSettingsOutputFilePath)" | ||
Lines="$(RunSettingsFileContent)" | ||
WriteOnlyWhenDifferent="true" | ||
Overwrite="true" /> | ||
|
||
<!-- Set RunSettingsFilePath property which is read by VSTest. --> | ||
<PropertyGroup> | ||
<RunSettingsFilePath>$(RunSettingsOutputFilePath)</RunSettingsFilePath> | ||
</PropertyGroup> | ||
</Target> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.