<commit_before><?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

  <!-- This is the target that copies the test assets to the test output -->
  <Import Project="$(MSBuildThisFileDirectory)publishtest.targets" />
  <UsingTask TaskName="GetTargetMachineInfo" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll"/>
  <!-- Which categories of tests to run by default -->
  <PropertyGroup>
    <TestDisabled>false</TestDisabled>
    <TestDisabled Condition="'$(IsTestProject)'!='true' Or '$(SkipTests)'=='true' Or '$(RunTestsForProject)'=='false'">true</TestDisabled>
    <TestsSuccessfulSemaphore>tests.passed</TestsSuccessfulSemaphore>
  </PropertyGroup>

  <ItemGroup>
    <!-- Split semicolon separated lists -->
    <WithCategoriesItems Include="$(WithCategories)" />
    <WithoutCategoriesItems Include="$(WithoutCategories)" />
    <DefaultNoCategories Include="$(DefaultNoCategories)" />
    <UnsupportedPlatformsItems Include="$(UnsupportedPlatforms)"/>
  </ItemGroup>

  <PropertyGroup>
    <TestWithCore Condition="'$(TestWithCore)' == '' And '$(TargetGroup)' == 'net45'">false</TestWithCore>
    <TestWithCore Condition="'$(TestWithCore)' == '' And '$(TargetGroup)' == 'net46'">false</TestWithCore>
    <TestWithCore Condition="'$(TestWithCore)' == '' And '$(TargetGroup)' == 'net461'">false</TestWithCore>
    <TestWithCore Condition="'$(TestWithCore)' == '' And '$(TargetGroup)' == 'net462'">false</TestWithCore>
    <TestWithCore Condition="'$(TestWithCore)' == ''">true</TestWithCore>
  </PropertyGroup>

  <PropertyGroup Condition="'$(TestWithCore)' == 'true'">
    <!-- Invoke with the correct casing of corerun per-OS.  There are some process tests
         that check the invoked process name against known casing which fail under code coverage.
         This is probably because the code coverage target invocation does not canonicalize the
         process name. -->
    <TestHost Condition="'$(OS)' == 'Windows_NT'">CoreRun.exe</TestHost>
    <TestHost Condition="'$(OS)' != 'Windows_NT'">corerun</TestHost>
    <TestHost>$(TestPath)dnxcore50/$(TestHost)</TestHost>
    <XunitExecutable Condition="'$(XunitExecutable)' == ''">xunit.console.netcore.exe</XunitExecutable>
    <DebugTestFrameworkFolder>dnxcore50</DebugTestFrameworkFolder>
    <DebugEngines>{2E36F1D4-B23C-435D-AB41-18E608940038}</DebugEngines>
  </PropertyGroup>

  <PropertyGroup Condition="'$(TestWithCore)' != 'true'">
    <XunitExecutable Condition="'$(XunitExecutable)' == ''">xunit.console.exe</XunitExecutable>
    <DebugTestFrameworkFolder>dnx45</DebugTestFrameworkFolder>
  </PropertyGroup>

  <ItemGroup Condition="'$(TestWithCore)' == 'true'">
    <TestTargetFramework Include="DNXCore,Version=v5.0">
      <Folder>dnxcore50</Folder>
    </TestTargetFramework>
  </ItemGroup>

  <ItemGroup Condition="'$(TestWithCore)' != 'true'">
    <TestTargetFramework Include=".NETFramework,Version=v4.6.2" Condition="'$(TargetGroup)' == 'net462'">
      <Folder>net462</Folder>
    </TestTargetFramework>
    <TestTargetFramework Include=".NETFramework,Version=v4.6.1" Condition="'$(TargetGroup)' == 'net461'">
      <Folder>net461</Folder>
    </TestTargetFramework>
    <TestTargetFramework Include=".NETFramework,Version=v4.6" Condition="'$(TargetGroup)' == 'net46'">
      <Folder>net46</Folder>
    </TestTargetFramework>
    <TestTargetFramework Include=".NETFramework,Version=v4.5" Condition="'$(TargetGroup)' == 'net45'">
      <Folder>net45</Folder>
    </TestTargetFramework>
  </ItemGroup>

  <!-- General xunit options -->
  <PropertyGroup>
    <XunitResultsFileName>testResults.xml</XunitResultsFileName>
    
    <XunitOptions Condition="'$(TestWithCore)' != 'true'">$(XunitOptions) -noshadow </XunitOptions>
    <XunitOptions>$(XunitOptions) -xml $(XunitResultsFileName)</XunitOptions>

    <XunitOptions Condition="'$(Performance)'!='true'">$(XunitOptions) -notrait Benchmark=true</XunitOptions>

    <XunitOptions Condition="'$(XunitMaxThreads)'!=''">$(XunitOptions) -maxthreads $(XunitMaxThreads)</XunitOptions>
    <XunitArguments>$(TargetFileName) $(XunitOptions)</XunitArguments>

    <TestProgram Condition="'$(TestHost)'!=''">$(TestHost)</TestProgram>
    <TestArguments Condition="'$(TestHost)'!=''">$(XunitExecutable) $(XunitArguments)</TestArguments>

    <TestProgram Condition="'$(TestHost)'==''">$(XunitExecutable)</TestProgram>
    <TestArguments Condition="'$(TestHost)'==''">$(XunitArguments)</TestArguments>

    <TestCommandLine>$(TestProgram) $(TestArguments) {XunitTraitOptions}</TestCommandLine>
  </PropertyGroup>

  <!-- The Code Coverage targets will override TestHost and TestCommandLine if coverage is enabled -->
  <Import Project="$(MSBuildThisFileDirectory)CodeCoverage.targets" />

  <!-- import settings for perf testing -->
  <Import Project="$(MSBuildThisFileDirectory)PerfTesting.targets" />

  <!-- In VS (2015 Preview or later currently required): Debug to run unit tests on CoreCLR. -->
  <PropertyGroup Condition="'$(IsTestProject)'=='true'">
    <StartWorkingDirectory Condition="'$(StartWorkingDirectory)'==''">$(TestPath)$(DebugTestFrameworkFolder)</StartWorkingDirectory>
    <StartAction Condition="'$(StartAction)'==''">Program</StartAction>
    <StartProgram Condition="'$(StartProgram)'==''">$(TestProgram)</StartProgram>
    <StartArguments Condition="'$(StartArguments)'==''">$(TestArguments) -wait</StartArguments>
  </PropertyGroup>

  <Target Name="DiscoverTestInputs" DependsOnTargets="ResolveProjectReferences;ResolveAssemblyReferences;GetCopyToOutputDirectoryItems">
    <ItemGroup>
      <RunTestsForProjectInputs Include="@(ReferenceCopyLocalPaths)" />
      <RunTestsForProjectInputs Include="@(Content)" />
      <RunTestsForProjectInputs Include="@(IntermediateAssembly)" />
      <RunTestsForProjectInputs Include="@(_DebugSymbolsIntermediatePath)" />
      <RunTestsForProjectInputs Include="@(AllItemsFullPathWithTargetPath)" />
    </ItemGroup>
  </Target>

  <!--
    On command line run unit tests on CoreCLR after the Test target.
    Set ForceRunTests to true to run tests even if there have been no changes since the last successful run.
  -->
  <Target Name="RunTestsForProject"
          DependsOnTargets="DiscoverTestInputs"
          AfterTargets="CheckTestCategories"
          Inputs="@(RunTestsForProjectInputs)"
          Outputs="$(TestsSuccessfulSemaphore);$(TestPath)%(TestTargetFramework.Folder)/$(XunitResultsFileName);$(CoverageOutputFilePath)"
          Condition="'$(TestDisabled)'!='true'"><commit_msg>Add -parallel none argument to the xunit call (#693)<commit_after><?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

  <!-- This is the target that copies the test assets to the test output -->
  <Import Project="$(MSBuildThisFileDirectory)publishtest.targets" />
  <UsingTask TaskName="GetTargetMachineInfo" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll"/>
  <!-- Which categories of tests to run by default -->
  <PropertyGroup>
    <TestDisabled>false</TestDisabled>
    <TestDisabled Condition="'$(IsTestProject)'!='true' Or '$(SkipTests)'=='true' Or '$(RunTestsForProject)'=='false'">true</TestDisabled>
    <TestsSuccessfulSemaphore>tests.passed</TestsSuccessfulSemaphore>
  </PropertyGroup>

  <ItemGroup>
    <!-- Split semicolon separated lists -->
    <WithCategoriesItems Include="$(WithCategories)" />
    <WithoutCategoriesItems Include="$(WithoutCategories)" />
    <DefaultNoCategories Include="$(DefaultNoCategories)" />
    <UnsupportedPlatformsItems Include="$(UnsupportedPlatforms)"/>
  </ItemGroup>

  <PropertyGroup>
    <TestWithCore Condition="'$(TestWithCore)' == '' And '$(TargetGroup)' == 'net45'">false</TestWithCore>
    <TestWithCore Condition="'$(TestWithCore)' == '' And '$(TargetGroup)' == 'net46'">false</TestWithCore>
    <TestWithCore Condition="'$(TestWithCore)' == '' And '$(TargetGroup)' == 'net461'">false</TestWithCore>
    <TestWithCore Condition="'$(TestWithCore)' == '' And '$(TargetGroup)' == 'net462'">false</TestWithCore>
    <TestWithCore Condition="'$(TestWithCore)' == ''">true</TestWithCore>
  </PropertyGroup>

  <PropertyGroup Condition="'$(TestWithCore)' == 'true'">
    <!-- Invoke with the correct casing of corerun per-OS.  There are some process tests
         that check the invoked process name against known casing which fail under code coverage.
         This is probably because the code coverage target invocation does not canonicalize the
         process name. -->
    <TestHost Condition="'$(OS)' == 'Windows_NT'">CoreRun.exe</TestHost>
    <TestHost Condition="'$(OS)' != 'Windows_NT'">corerun</TestHost>
    <TestHost>$(TestPath)dnxcore50/$(TestHost)</TestHost>
    <XunitExecutable Condition="'$(XunitExecutable)' == ''">xunit.console.netcore.exe</XunitExecutable>
    <DebugTestFrameworkFolder>dnxcore50</DebugTestFrameworkFolder>
    <DebugEngines>{2E36F1D4-B23C-435D-AB41-18E608940038}</DebugEngines>
  </PropertyGroup>

  <PropertyGroup Condition="'$(TestWithCore)' != 'true'">
    <XunitExecutable Condition="'$(XunitExecutable)' == ''">xunit.console.exe</XunitExecutable>
    <DebugTestFrameworkFolder>dnx45</DebugTestFrameworkFolder>
  </PropertyGroup>

  <ItemGroup Condition="'$(TestWithCore)' == 'true'">
    <TestTargetFramework Include="DNXCore,Version=v5.0">
      <Folder>dnxcore50</Folder>
    </TestTargetFramework>
  </ItemGroup>

  <ItemGroup Condition="'$(TestWithCore)' != 'true'">
    <TestTargetFramework Include=".NETFramework,Version=v4.6.2" Condition="'$(TargetGroup)' == 'net462'">
      <Folder>net462</Folder>
    </TestTargetFramework>
    <TestTargetFramework Include=".NETFramework,Version=v4.6.1" Condition="'$(TargetGroup)' == 'net461'">
      <Folder>net461</Folder>
    </TestTargetFramework>
    <TestTargetFramework Include=".NETFramework,Version=v4.6" Condition="'$(TargetGroup)' == 'net46'">
      <Folder>net46</Folder>
    </TestTargetFramework>
    <TestTargetFramework Include=".NETFramework,Version=v4.5" Condition="'$(TargetGroup)' == 'net45'">
      <Folder>net45</Folder>
    </TestTargetFramework>
  </ItemGroup>

  <!-- General xunit options -->
  <PropertyGroup>
    <XunitResultsFileName>testResults.xml</XunitResultsFileName>
    
    <XunitOptions Condition="'$(TestWithCore)' != 'true'">$(XunitOptions) -noshadow </XunitOptions>
    <XunitOptions>$(XunitOptions) -xml $(XunitResultsFileName)</XunitOptions>

    <XunitOptions Condition="'$(Performance)'!='true'">$(XunitOptions) -notrait Benchmark=true</XunitOptions>

    <XunitOptions Condition="'$(XunitMaxThreads)'!=''">$(XunitOptions) -maxthreads $(XunitMaxThreads)</XunitOptions>
    <XunitArguments>$(TargetFileName) $(XunitOptions)</XunitArguments>

    <TestProgram Condition="'$(TestHost)'!=''">$(TestHost)</TestProgram>
    <TestArguments Condition="'$(TestHost)'!=''">$(XunitExecutable) $(XunitArguments)</TestArguments>

    <TestProgram Condition="'$(TestHost)'==''">$(XunitExecutable)</TestProgram>
    <TestArguments Condition="'$(TestHost)'==''">$(XunitArguments)</TestArguments>

    <TestCommandLine>$(TestProgram) $(TestArguments) {XunitTraitOptions}</TestCommandLine>
  </PropertyGroup>

  <!-- The Code Coverage targets will override TestHost and TestCommandLine if coverage is enabled -->
  <Import Project="$(MSBuildThisFileDirectory)CodeCoverage.targets" />

  <!-- import settings for perf testing -->
  <Import Project="$(MSBuildThisFileDirectory)PerfTesting.targets" />

  <!-- In VS (2015 Preview or later currently required): Debug to run unit tests on CoreCLR. -->
  <PropertyGroup Condition="'$(IsTestProject)'=='true'">
    <StartWorkingDirectory Condition="'$(StartWorkingDirectory)'==''">$(TestPath)$(DebugTestFrameworkFolder)</StartWorkingDirectory>
    <StartAction Condition="'$(StartAction)'==''">Program</StartAction>
    <StartProgram Condition="'$(StartProgram)'==''">$(TestProgram)</StartProgram>
    <StartArguments Condition="'$(StartArguments)'==''">$(TestArguments) -wait -parallel none</StartArguments>
  </PropertyGroup>

  <Target Name="DiscoverTestInputs" DependsOnTargets="ResolveProjectReferences;ResolveAssemblyReferences;GetCopyToOutputDirectoryItems">
    <ItemGroup>
      <RunTestsForProjectInputs Include="@(ReferenceCopyLocalPaths)" />
      <RunTestsForProjectInputs Include="@(Content)" />
      <RunTestsForProjectInputs Include="@(IntermediateAssembly)" />
      <RunTestsForProjectInputs Include="@(_DebugSymbolsIntermediatePath)" />
      <RunTestsForProjectInputs Include="@(AllItemsFullPathWithTargetPath)" />
    </ItemGroup>
  </Target>

  <!--
    On command line run unit tests on CoreCLR after the Test target.
    Set ForceRunTests to true to run tests even if there have been no changes since the last successful run.
  -->
  <Target Name="RunTestsForProject"
          DependsOnTargets="DiscoverTestInputs"
          AfterTargets="CheckTestCategories"
          Inputs="@(RunTestsForProjectInputs)"
          Outputs="$(TestsSuccessfulSemaphore);$(TestPath)%(TestTargetFramework.Folder)/$(XunitResultsFileName);$(CoverageOutputFilePath)"
          Condition="'$(TestDisabled)'!='true'">
{'fraction_non_alphanumeric': 0.16487590799031476, 'fraction_numerical': 0.013392857142857142, 'mean_word_length': 5.816400206291903, 'pattern_counts': {'":': 0, '<': 261, '<?xml version=': 2, '>': 261, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5215193', 'n_tokens_mistral': 4018, 'n_tokens_neox': 3568, 'n_words': 653}