diff options
author | Jan Kotas <jkotas@microsoft.com> | 2018-09-07 18:06:08 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-07 18:06:08 +0300 |
commit | a59cf6889680bb7e5fe40cc654912be160ca3320 (patch) | |
tree | d059b4cba314ee5549f35e6faa7f9b7ede48cd9c | |
parent | 296c7356f3df796b62d965bc0d9a315390ef4fcf (diff) |
Update to official XUnit 2.4 (#6299)
* Update to official XUnit 2.4
* Use dotnet msbuild to build
22 files changed, 153 insertions, 61 deletions
diff --git a/BuildToolsVersion.txt b/BuildToolsVersion.txt index 810057496..c42edc75e 100644 --- a/BuildToolsVersion.txt +++ b/BuildToolsVersion.txt @@ -1 +1 @@ -2.2.0-preview1-02908-01 +3.0.0-preview1-03205-01
\ No newline at end of file diff --git a/buildscripts/build-managed.cmd b/buildscripts/build-managed.cmd index c052aef78..14a6b9d2e 100644 --- a/buildscripts/build-managed.cmd +++ b/buildscripts/build-managed.cmd @@ -55,7 +55,7 @@ IF ERRORLEVEL 1 exit /b %ERRORLEVEL% call "!VS%__VSProductVersion%COMNTOOLS!\VsDevCmd.bat" echo Commencing build of managed components for %__BuildOS%.%__BuildArch%.%__BuildType% echo. -%_msbuildexe% /ConsoleLoggerParameters:ForceNoAlign "%__ProjectDir%\build.proj" %__ExtraMsBuildParams% /p:RepoPath="%__ProjectDir%" /p:RepoLocalBuild="true" /p:NuPkgRid=%__NugetRuntimeId% /nologo /maxcpucount /verbosity:minimal /nodeReuse:false /fileloggerparameters:Verbosity=normal;LogFile="%__BuildLog%" +"%__DotNetCliPath%\dotnet.exe" msbuild /ConsoleLoggerParameters:ForceNoAlign "%__ProjectDir%\build.proj" %__ExtraMsBuildParams% /p:RepoPath="%__ProjectDir%" /p:RepoLocalBuild="true" /p:NuPkgRid=%__NugetRuntimeId% /nologo /maxcpucount /verbosity:minimal /nodeReuse:false /fileloggerparameters:Verbosity=normal;LogFile="%__BuildLog%" IF NOT ERRORLEVEL 1 ( findstr /ir /c:".*Warning(s)" /c:".*Error(s)" /c:"Time Elapsed.*" "%__BuildLog%" goto AfterILCompilerBuild @@ -71,14 +71,14 @@ set __GenRespFiles=0 if not exist "%__ObjDir%\ryujit.rsp" set __GenRespFiles=1 if not exist "%__ObjDir%\cpp.rsp" set __GenRespFiles=1 if "%__GenRespFiles%"=="1" ( - %_msbuildexe% /ConsoleLoggerParameters:ForceNoAlign "/p:IlcPath=%__BinDir%" /p:Configuration=%__BuildType% /t:Clean,IlcCompile "%__ProjectDir%\src\ILCompiler\repro\repro.csproj" + "%__DotNetCliPath%\dotnet.exe" msbuild /ConsoleLoggerParameters:ForceNoAlign "/p:IlcPath=%__BinDir%" /p:Configuration=%__BuildType% /t:Clean,IlcCompile "%__ProjectDir%\src\ILCompiler\repro\repro.csproj" call :CopyResponseFile "%__ObjDir%\repro\native\repro.ilc.rsp" "%__ObjDir%\ryujit.rsp" set __ExtraArgs=/p:NativeCodeGen=cpp if /i "%__BuildType%"=="debug" ( set __ExtraArgs=!__ExtraArgs! "/p:AdditionalCppCompilerFlags=/MTd" ) - %_msbuildexe% /ConsoleLoggerParameters:ForceNoAlign "/p:IlcPath=%__BinDir%" /p:Configuration=%__BuildType% /t:Clean,IlcCompile "%__ProjectDir%\src\ILCompiler\repro\repro.csproj" !__ExtraArgs! + "%__DotNetCliPath%\dotnet.exe" msbuild /ConsoleLoggerParameters:ForceNoAlign "/p:IlcPath=%__BinDir%" /p:Configuration=%__BuildType% /t:Clean,IlcCompile "%__ProjectDir%\src\ILCompiler\repro\repro.csproj" !__ExtraArgs! call :CopyResponseFile "%__ObjDir%\repro\native\repro.ilc.rsp" "%__ObjDir%\cpp.rsp" ) :AfterVsDevGenerateRespFiles diff --git a/dependencies.props b/dependencies.props index b78843d3a..578a74329 100644 --- a/dependencies.props +++ b/dependencies.props @@ -6,6 +6,8 @@ <CoreFxUapVersion>4.7.0-preview1-26831-01</CoreFxUapVersion> <MicrosoftNETCoreNativeVersion>3.0.0-preview1-26831-01</MicrosoftNETCoreNativeVersion> <MicrosoftNETCoreAppPackageVersion>2.1.0</MicrosoftNETCoreAppPackageVersion> - <XunitNetcoreExtensionsVersion>1.0.1-prerelease-02104-02</XunitNetcoreExtensionsVersion> + <MicrosoftDotNetTestSdkVersion>15.8.0</MicrosoftDotNetTestSdkVersion> + <XUnitPackageVersion>2.4.1-pre.build.4059</XUnitPackageVersion> + <MicrosoftDotNetXUnitExtensionsVersion>2.4.0-beta.18420.3</MicrosoftDotNetXUnitExtensionsVersion> </PropertyGroup> </Project> @@ -149,7 +149,7 @@ </PropertyGroup> <ItemGroup> - <SupplementalTestData Include="$(RuntimePath)*.dll" /> + <SupplementalTestData Include="$(RuntimePath)*" /> </ItemGroup> <!-- initialize all the targets variables to false as they should only be set below --> @@ -263,6 +263,11 @@ <SkipTests Condition="'$(SkipTests)'=='' and ('$(OsEnvironment)'=='Windows_NT' and '$(TargetsWindows)'!='true')">true</SkipTests> </PropertyGroup> + <PropertyGroup> + <!-- On Windows fallback to ILAsm from the framework for now --> + <IlasmToolPath Condition="'$(OSEnvironment)'=='Windows_NT'">%WINDIR%\Microsoft.NET\Framework\v4.0.30319\ilasm.exe</IlasmToolPath> + </PropertyGroup> + <!-- Use Roslyn Compilers to build --> <Import Project="$(RoslynPropsFile)" Condition="Exists('$(RoslynPropsFile)')" /> </Project> diff --git a/init-tools.cmd b/init-tools.cmd index 281875020..7c5fbfa12 100644 --- a/init-tools.cmd +++ b/init-tools.cmd @@ -2,20 +2,21 @@ setlocal set INIT_TOOLS_LOG=%~dp0init-tools.log -if [%PACKAGES_DIR%]==[] set PACKAGES_DIR=%~dp0packages\ +if [%PACKAGES_DIR%]==[] set PACKAGES_DIR=%~dp0packages if [%TOOLRUNTIME_DIR%]==[] set TOOLRUNTIME_DIR=%~dp0Tools set DOTNET_PATH=%TOOLRUNTIME_DIR%\dotnetcli\ if [%DOTNET_CMD%]==[] set DOTNET_CMD=%DOTNET_PATH%dotnet.exe if [%BUILDTOOLS_SOURCE%]==[] set BUILDTOOLS_SOURCE=https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json set /P BUILDTOOLS_VERSION=< "%~dp0BuildToolsVersion.txt" -set BUILD_TOOLS_PATH=%PACKAGES_DIR%Microsoft.DotNet.BuildTools\%BUILDTOOLS_VERSION%\lib\ +set BUILD_TOOLS_PATH=%PACKAGES_DIR%\Microsoft.DotNet.BuildTools\%BUILDTOOLS_VERSION%\lib set INIT_TOOLS_RESTORE_PROJECT=%~dp0init-tools.msbuild -set BUILD_TOOLS_SEMAPHORE=%TOOLRUNTIME_DIR%\%BUILDTOOLS_VERSION%\init-tools.completed +set BUILD_TOOLS_SEMAPHORE_DIR=%TOOLRUNTIME_DIR%\%BUILDTOOLS_VERSION% +set BUILD_TOOLS_SEMAPHORE=%BUILD_TOOLS_SEMAPHORE_DIR%\init-tools.completed :: if force option is specified then clean the tool runtime and build tools package directory to force it to get recreated if [%1]==[force] ( if exist "%TOOLRUNTIME_DIR%" rmdir /S /Q "%TOOLRUNTIME_DIR%" - if exist "%PACKAGES_DIR%Microsoft.DotNet.BuildTools" rmdir /S /Q "%PACKAGES_DIR%Microsoft.DotNet.BuildTools" + if exist "%PACKAGES_DIR%\Microsoft.DotNet.BuildTools" rmdir /S /Q "%PACKAGES_DIR%\Microsoft.DotNet.BuildTools" ) :: If semaphore exists do nothing @@ -26,6 +27,21 @@ if exist "%BUILD_TOOLS_SEMAPHORE%" ( if exist "%TOOLRUNTIME_DIR%" rmdir /S /Q "%TOOLRUNTIME_DIR%" +if exist "%DotNetBuildToolsDir%" ( + echo Using tools from '%DotNetBuildToolsDir%'. + mklink /j "%TOOLRUNTIME_DIR%" "%DotNetBuildToolsDir%" + + if not exist "%DOTNET_CMD%" ( + echo ERROR: Ensure that '%DotNetBuildToolsDir%' contains the .NET Core SDK at '%DOTNET_PATH%' + exit /b 1 + ) + + echo Done initializing tools. + if NOT exist "%BUILD_TOOLS_SEMAPHORE_DIR%" mkdir "%BUILD_TOOLS_SEMAPHORE_DIR%" + echo Using tools from '%DotNetBuildToolsDir%'. > "%BUILD_TOOLS_SEMAPHORE%" + exit /b 0 +) + echo Running %0 > "%INIT_TOOLS_LOG%" set /p DOTNET_VERSION=< "%~dp0DotnetCLIVersion.txt" @@ -37,7 +53,7 @@ set DOTNET_ZIP_NAME=dotnet-sdk-%DOTNET_VERSION%-win-x64.zip set DOTNET_REMOTE_PATH=https://dotnetcli.azureedge.net/dotnet/Sdk/%DOTNET_VERSION%/%DOTNET_ZIP_NAME% set DOTNET_LOCAL_PATH=%DOTNET_PATH%%DOTNET_ZIP_NAME% echo Installing '%DOTNET_REMOTE_PATH%' to '%DOTNET_LOCAL_PATH%' >> "%INIT_TOOLS_LOG%" -powershell -NoProfile -ExecutionPolicy unrestricted -Command "$retryCount = 0; $success = $false; do { try { (New-Object Net.WebClient).DownloadFile('%DOTNET_REMOTE_PATH%', '%DOTNET_LOCAL_PATH%'); $success = $true; } catch { if ($retryCount -ge 6) { throw; } else { $retryCount++; Start-Sleep -Seconds (5 * $retryCount); } } } while ($success -eq $false); Add-Type -Assembly 'System.IO.Compression.FileSystem' -ErrorVariable AddTypeErrors; if ($AddTypeErrors.Count -eq 0) { [System.IO.Compression.ZipFile]::ExtractToDirectory('%DOTNET_LOCAL_PATH%', '%DOTNET_PATH%') } else { (New-Object -com shell.application).namespace('%DOTNET_PATH%').CopyHere((new-object -com shell.application).namespace('%DOTNET_LOCAL_PATH%').Items(),16) }" >> "%INIT_TOOLS_LOG%" +powershell -NoProfile -ExecutionPolicy unrestricted -Command "$retryCount = 0; $success = $false; $proxyCredentialsRequired = $false; do { try { $wc = New-Object Net.WebClient; if ($proxyCredentialsRequired) { [Net.WebRequest]::DefaultWebProxy.Credentials = [Net.CredentialCache]::DefaultNetworkCredentials; } $wc.DownloadFile('%DOTNET_REMOTE_PATH%', '%DOTNET_LOCAL_PATH%'); $success = $true; } catch { if ($retryCount -ge 6) { throw; } else { $we = $_.Exception.InnerException -as [Net.WebException]; $proxyCredentialsRequired = ($we -ne $null -and ([Net.HttpWebResponse]$we.Response).StatusCode -eq [Net.HttpStatusCode]::ProxyAuthenticationRequired); Start-Sleep -Seconds (5 * $retryCount); $retryCount++; } } } while ($success -eq $false); Add-Type -Assembly 'System.IO.Compression.FileSystem' -ErrorVariable AddTypeErrors; if ($AddTypeErrors.Count -eq 0) { [System.IO.Compression.ZipFile]::ExtractToDirectory('%DOTNET_LOCAL_PATH%', '%DOTNET_PATH%') } else { (New-Object -com shell.application).namespace('%DOTNET_PATH%').CopyHere((new-object -com shell.application).namespace('%DOTNET_LOCAL_PATH%').Items(),16) }" >> "%INIT_TOOLS_LOG%" if NOT exist "%DOTNET_LOCAL_PATH%" ( echo ERROR: Could not install dotnet cli correctly. 1>&2 goto :error @@ -47,9 +63,9 @@ if NOT exist "%DOTNET_LOCAL_PATH%" ( if exist "%BUILD_TOOLS_PATH%" goto :afterbuildtoolsrestore echo Restoring BuildTools version %BUILDTOOLS_VERSION%... -echo Running: "%DOTNET_CMD%" restore "%INIT_TOOLS_RESTORE_PROJECT%" --no-cache --packages %PACKAGES_DIR% --source "%BUILDTOOLS_SOURCE%" /p:BuildToolsPackageVersion=%BUILDTOOLS_VERSION% >> "%INIT_TOOLS_LOG%" -call "%DOTNET_CMD%" restore "%INIT_TOOLS_RESTORE_PROJECT%" --no-cache --packages %PACKAGES_DIR% --source "%BUILDTOOLS_SOURCE%" /p:BuildToolsPackageVersion=%BUILDTOOLS_VERSION% >> "%INIT_TOOLS_LOG%" -if NOT exist "%BUILD_TOOLS_PATH%init-tools.cmd" ( +echo Running: "%DOTNET_CMD%" restore "%INIT_TOOLS_RESTORE_PROJECT%" --no-cache --packages "%PACKAGES_DIR%" --source "%BUILDTOOLS_SOURCE%" /p:BuildToolsPackageVersion=%BUILDTOOLS_VERSION% /p:ToolsDir=%TOOLRUNTIME_DIR% >> "%INIT_TOOLS_LOG%" +call "%DOTNET_CMD%" restore "%INIT_TOOLS_RESTORE_PROJECT%" --no-cache --packages "%PACKAGES_DIR%" --source "%BUILDTOOLS_SOURCE%" /p:BuildToolsPackageVersion=%BUILDTOOLS_VERSION% /p:ToolsDir=%TOOLRUNTIME_DIR% >> "%INIT_TOOLS_LOG%" +if NOT exist "%BUILD_TOOLS_PATH%\init-tools.cmd" ( echo ERROR: Could not restore build tools correctly. 1>&2 goto :error ) @@ -57,19 +73,17 @@ if NOT exist "%BUILD_TOOLS_PATH%init-tools.cmd" ( :afterbuildtoolsrestore echo Initializing BuildTools... -echo Running: "%BUILD_TOOLS_PATH%init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" >> "%INIT_TOOLS_LOG%" -call "%BUILD_TOOLS_PATH%init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" >> "%INIT_TOOLS_LOG%" +echo Running: "%BUILD_TOOLS_PATH%\init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" >> "%INIT_TOOLS_LOG%" +call "%BUILD_TOOLS_PATH%\init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" "%PACKAGES_DIR%" >> "%INIT_TOOLS_LOG%" set INIT_TOOLS_ERRORLEVEL=%ERRORLEVEL% if not [%INIT_TOOLS_ERRORLEVEL%]==[0] ( echo ERROR: An error occured when trying to initialize the tools. 1>&2 goto :error ) -rem CoreRT does not use special copy of the shared runtime for testing -copy /Y %TOOLRUNTIME_DIR%\csc.runtimeconfig.json %TOOLRUNTIME_DIR%\xunit.console.netcore.runtimeconfig.json - :: Create semaphore file echo Done initializing tools. +if NOT exist "%BUILD_TOOLS_SEMAPHORE_DIR%" mkdir "%BUILD_TOOLS_SEMAPHORE_DIR%" echo Init-Tools.cmd completed for BuildTools Version: %BUILDTOOLS_VERSION% > "%BUILD_TOOLS_SEMAPHORE%" exit /b 0 diff --git a/init-tools.sh b/init-tools.sh index 06c4b1569..bb7362a08 100755 --- a/init-tools.sh +++ b/init-tools.sh @@ -148,9 +148,6 @@ if [ ! -e $__INIT_TOOLS_DONE_MARKER ]; then Tools/crossgen.sh $__scriptpath/Tools $__PKG_RID - # CoreRT does not use special copy of the shared runtime for testing - cp $__TOOLRUNTIME_DIR/csc.runtimeconfig.json $__TOOLRUNTIME_DIR/xunit.console.netcore.runtimeconfig.json - mkdir -p $__INIT_TOOLS_DONE_MARKER_DIR touch $__INIT_TOOLS_DONE_MARKER diff --git a/src/Common/test-runtime/XUnit.Runtime.depproj b/src/Common/test-runtime/XUnit.Runtime.depproj index de12bce81..0d3b67d6e 100644 --- a/src/Common/test-runtime/XUnit.Runtime.depproj +++ b/src/Common/test-runtime/XUnit.Runtime.depproj @@ -8,29 +8,90 @@ <TargetFramework>netcoreapp2.1</TargetFramework> <RidSpecificAssets>true</RidSpecificAssets> <OutputPath>$(RuntimePath)</OutputPath> + <XUnitRunnerPackageId>xunit.runner.console</XUnitRunnerPackageId> + <XUnitRunner>xunit.console</XUnitRunner> + <XUnitTestAdapterPackageId>xunit.runner.visualstudio</XUnitTestAdapterPackageId> + <XUnitAdapter>xunit.runner.visualstudio.dotnetcore.testadapter</XUnitAdapter> + <TestPlatformHostPackageId>microsoft.testplatform.testhost</TestPlatformHostPackageId> + <TestPlatformHost>testhost</TestPlatformHost> + <!-- In case the project language is not set --> + <Language Condition="'$(Language)' == ''">unknown</Language> <!-- Don't warn if some dependencies were rolled forward --> <NoWarn>$(NoWarn);NU1603</NoWarn> </PropertyGroup> <ItemGroup> - <PackageReference Include="xunit.console.netcore"> - <Version>1.0.3-prerelease-00921-01</Version> + <PackageReference Include="xunit"> + <Version>$(XUnitPackageVersion)</Version> </PackageReference> - <PackageReference Include="Microsoft.DotNet.BuildTools.TestSuite"> - <Version>$(XunitNetcoreExtensionsVersion)</Version> + <PackageReference Include="$(XUnitRunnerPackageId)"> + <Version>$(XUnitPackageVersion)</Version> </PackageReference> - <PackageReference Include="Microsoft.xunit.netcore.extensions"> - <Version>$(XunitNetcoreExtensionsVersion)</Version> + <PackageReference Include="Microsoft.DotNet.XUnitExtensions"> + <Version>$(MicrosoftDotNetXUnitExtensionsVersion)</Version> + </PackageReference> + <PackageReference Include="$(XUnitTestAdapterPackageId)"> + <Version>$(XUnitPackageVersion)</Version> + </PackageReference> + <PackageReference Include="Microsoft.NET.Test.Sdk"> + <Version>$(MicrosoftDotNetTestSdkVersion)</Version> + </PackageReference> + <PackageReference Include="Microsoft.TestPlatform.ObjectModel"> + <Version>$(MicrosoftDotNetTestSdkVersion)</Version> + </PackageReference> + <PackageReference Include="$(TestPlatformHostPackageId)"> + <Version>$(MicrosoftDotNetTestSdkVersion)</Version> + </PackageReference> + <PackageReference Include="Microsoft.Extensions.DependencyModel"> + <Version>2.0.4</Version> + </PackageReference> + <PackageReference Include="Newtonsoft.Json"> + <Version>9.0.1</Version> </PackageReference> </ItemGroup> + <Target Name="AddTestPlatformDependenciesNetCore" BeforeTargets="ResolveReferences"> + <Error Condition="!Exists('$(PackagesDir)$(XUnitRunnerPackageId)\$(XUnitPackageVersion)\tools\netcoreapp2.0\$(XUnitRunner).dll')" + Text="Error: looks the package $(PackagesDir)$(XUnitRunnerPackageId)\$(XUnitPackageVersion) not restored or missing $(XUnitRunner).dll." + /> + <Error Condition="!Exists('$(PackagesDir)$(XUnitTestAdapterPackageId)\$(XUnitPackageVersion)\build\netcoreapp1.0\$(XUnitAdapter).dll')" + Text="Error: looks the package $(PackagesDir)$(XUnitTestAdapterPackageId)\$(XUnitPackageVersion) not restored or missing $(XUnitAdapter).dll." + /> + <Error Condition="!Exists('$(PackagesDir)$(TestPlatformHostPackageId)\$(MicrosoftDotNetTestSdkVersion)\lib\netstandard1.5\$(TestPlatformHost).dll')" + Text="Error: looks the package $(PackagesDir)$(TestPlatformHostPackageId)\$(MicrosoftDotNetTestSdkVersion) not restored or missing $(TestPlatformHost).dll." + /> + <ItemGroup> + <ReferenceCopyLocalPaths Include="$(PackagesDir)$(XUnitRunnerPackageId)\$(XUnitPackageVersion)\tools\netcoreapp2.0\*.*"> + <Private>false</Private> + <NuGetPackageId>$(XUnitRunnerPackageId)</NuGetPackageId> + <NuGetPackageVersion>$(XUnitPackageVersion)</NuGetPackageVersion> + </ReferenceCopyLocalPaths> + <ReferenceCopyLocalPaths Include="$(PackagesDir)$(XUnitTestAdapterPackageId)\$(XUnitPackageVersion)\build\netcoreapp1.0\*.*"> + <Private>false</Private> + <NuGetPackageId>$(XUnitTestAdapterPackageId)</NuGetPackageId> + <NuGetPackageVersion>$(XUnitPackageVersion)</NuGetPackageVersion> + </ReferenceCopyLocalPaths> + <ReferenceCopyLocalPaths Include="$(PackagesDir)$(TestPlatformHostPackageId)\$(MicrosoftDotNetTestSdkVersion)\lib\netstandard1.5\$(TestPlatformHost).dll"> + <Private>false</Private> + <NuGetPackageId>$(TestPlatformHostPackageId)</NuGetPackageId> + <NuGetPackageVersion>$(MicrosoftDotNetTestSdkVersion)</NuGetPackageVersion> + </ReferenceCopyLocalPaths> + </ItemGroup> + </Target> <ItemGroup> - <PackageToInclude Include="xunit.abstractions"/> - <PackageToInclude Include="xunit.assert"/> - <PackageToInclude Include="xunit.extensibility.core"/> - <PackageToInclude Include="xunit.extensibility.execution"/> - <PackageToInclude Include="xunit.runner.utility"/> - <PackageToInclude Include="Microsoft.xunit.netcore.extensions"/> - <PackageToInclude Include="xunit.console.netcore" /> - </ItemGroup> + <!-- xunit core --> + <PackageToInclude Include="xunit.abstractions" /> + <PackageToInclude Include="xunit.assert" /> + <PackageToInclude Include="xunit.extensibility.core" /> + <PackageToInclude Include="xunit.extensibility.execution" /> + <PackageToInclude Include="xunit.runner.utility" /> + <PackageToInclude Include="Microsoft.DotNet.XUnitExtensions" /> + + <!-- test sdk --> + <PackageToInclude Include="Microsoft.NET.Test.Sdk" /> + <PackageToInclude Include="Microsoft.TestPlatform.TestHost" /> + <PackageToInclude Include="Microsoft.TestPlatform.ObjectModel" /> + <PackageToInclude Include="Microsoft.Extensions.DependencyModel" /> + <PackageToInclude Include="Newtonsoft.Json" /> + </ItemGroup> <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> </Project> diff --git a/src/ILCompiler.Compiler/tests/ILCompiler.Compiler.Tests.Assets/ILCompiler.Compiler.Tests.Assets.csproj b/src/ILCompiler.Compiler/tests/ILCompiler.Compiler.Tests.Assets/ILCompiler.Compiler.Tests.Assets.csproj index 44d852d96..a463d125f 100644 --- a/src/ILCompiler.Compiler/tests/ILCompiler.Compiler.Tests.Assets/ILCompiler.Compiler.Tests.Assets.csproj +++ b/src/ILCompiler.Compiler/tests/ILCompiler.Compiler.Tests.Assets/ILCompiler.Compiler.Tests.Assets.csproj @@ -4,7 +4,7 @@ <OutputType>Library</OutputType> <AssemblyName>ILCompiler.Compiler.Tests.Assets</AssemblyName> <GenerateAssemblyInfo>false</GenerateAssemblyInfo> - <RunTestsForProject>false</RunTestsForProject> + <SkipTestRun>true</SkipTestRun> </PropertyGroup> <ItemGroup> diff --git a/src/ILCompiler.Compiler/tests/ILCompiler.Compiler.Tests.csproj b/src/ILCompiler.Compiler/tests/ILCompiler.Compiler.Tests.csproj index 765808b0b..797bb79fe 100644 --- a/src/ILCompiler.Compiler/tests/ILCompiler.Compiler.Tests.csproj +++ b/src/ILCompiler.Compiler/tests/ILCompiler.Compiler.Tests.csproj @@ -7,8 +7,11 @@ <TargetFramework>netstandard2.0</TargetFramework> </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.DotNet.BuildTools.TestSuite"> - <Version>$(XunitNetcoreExtensionsVersion)</Version> + <PackageReference Include="xunit"> + <Version>$(XUnitPackageVersion)</Version> + </PackageReference> + <PackageReference Include="Microsoft.DotNet.XUnitExtensions"> + <Version>$(MicrosoftDotNetXUnitExtensionsVersion)</Version> </PackageReference> </ItemGroup> <ItemGroup> diff --git a/src/ILCompiler.DependencyAnalysisFramework/tests/ILCompiler.DependencyAnalysisFramework.Tests.csproj b/src/ILCompiler.DependencyAnalysisFramework/tests/ILCompiler.DependencyAnalysisFramework.Tests.csproj index 895541c31..a352c7c0c 100644 --- a/src/ILCompiler.DependencyAnalysisFramework/tests/ILCompiler.DependencyAnalysisFramework.Tests.csproj +++ b/src/ILCompiler.DependencyAnalysisFramework/tests/ILCompiler.DependencyAnalysisFramework.Tests.csproj @@ -13,8 +13,11 @@ <PackageReference Include="System.Collections.Immutable"> <Version>1.3.1</Version> </PackageReference> - <PackageReference Include="Microsoft.DotNet.BuildTools.TestSuite"> - <Version>$(XunitNetcoreExtensionsVersion)</Version> + <PackageReference Include="xunit"> + <Version>$(XUnitPackageVersion)</Version> + </PackageReference> + <PackageReference Include="Microsoft.DotNet.XUnitExtensions"> + <Version>$(MicrosoftDotNetXUnitExtensionsVersion)</Version> </PackageReference> </ItemGroup> <ItemGroup> diff --git a/src/ILCompiler.MetadataTransform/tests/ILCompiler.MetadataTransform.Tests.csproj b/src/ILCompiler.MetadataTransform/tests/ILCompiler.MetadataTransform.Tests.csproj index a577446e5..1a3d8e52a 100644 --- a/src/ILCompiler.MetadataTransform/tests/ILCompiler.MetadataTransform.Tests.csproj +++ b/src/ILCompiler.MetadataTransform/tests/ILCompiler.MetadataTransform.Tests.csproj @@ -7,8 +7,11 @@ <TargetFramework>netstandard2.0</TargetFramework> </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.DotNet.BuildTools.TestSuite"> - <Version>$(XunitNetcoreExtensionsVersion)</Version> + <PackageReference Include="xunit"> + <Version>$(XUnitPackageVersion)</Version> + </PackageReference> + <PackageReference Include="Microsoft.DotNet.XUnitExtensions"> + <Version>$(MicrosoftDotNetXUnitExtensionsVersion)</Version> </PackageReference> </ItemGroup> <ItemGroup> diff --git a/src/ILCompiler.MetadataTransform/tests/ILMetadataAssembly/ILMetadataAssembly.ilproj b/src/ILCompiler.MetadataTransform/tests/ILMetadataAssembly/ILMetadataAssembly.ilproj index 8e383e067..63712c1f4 100644 --- a/src/ILCompiler.MetadataTransform/tests/ILMetadataAssembly/ILMetadataAssembly.ilproj +++ b/src/ILCompiler.MetadataTransform/tests/ILMetadataAssembly/ILMetadataAssembly.ilproj @@ -5,7 +5,7 @@ <PropertyGroup> <OutputType>Library</OutputType> <AssemblyName>ILMetadataAssembly</AssemblyName> - <RunTestsForProject>false</RunTestsForProject> + <SkipTestRun>true</SkipTestRun> </PropertyGroup> <ItemGroup> diff --git a/src/ILCompiler.MetadataTransform/tests/PrimaryMetadataAssembly/PrimaryMetadataAssembly.csproj b/src/ILCompiler.MetadataTransform/tests/PrimaryMetadataAssembly/PrimaryMetadataAssembly.csproj index 82b325adf..a64f83430 100644 --- a/src/ILCompiler.MetadataTransform/tests/PrimaryMetadataAssembly/PrimaryMetadataAssembly.csproj +++ b/src/ILCompiler.MetadataTransform/tests/PrimaryMetadataAssembly/PrimaryMetadataAssembly.csproj @@ -5,7 +5,7 @@ <AssemblyName>PrimaryMetadataAssembly</AssemblyName> <GenerateAssemblyInfo>false</GenerateAssemblyInfo> <IsCoreAssembly>true</IsCoreAssembly> - <RunTestsForProject>false</RunTestsForProject> + <SkipTestRun>true</SkipTestRun> </PropertyGroup> <ItemGroup> <Compile Include="Platform.cs" /> diff --git a/src/ILCompiler.MetadataTransform/tests/SampleMetadataAssembly/SampleMetadataAssembly.csproj b/src/ILCompiler.MetadataTransform/tests/SampleMetadataAssembly/SampleMetadataAssembly.csproj index 04ff2298d..796a387b6 100644 --- a/src/ILCompiler.MetadataTransform/tests/SampleMetadataAssembly/SampleMetadataAssembly.csproj +++ b/src/ILCompiler.MetadataTransform/tests/SampleMetadataAssembly/SampleMetadataAssembly.csproj @@ -4,7 +4,7 @@ <OutputType>Library</OutputType> <AssemblyName>SampleMetadataAssembly</AssemblyName> <GenerateAssemblyInfo>false</GenerateAssemblyInfo> - <RunTestsForProject>false</RunTestsForProject> + <SkipTestRun>true</SkipTestRun> </PropertyGroup> <ItemGroup> diff --git a/src/ILCompiler.MetadataTransform/tests/SampleWinRTMetadataAssembly/SampleWinRTMetadataAssembly.csproj b/src/ILCompiler.MetadataTransform/tests/SampleWinRTMetadataAssembly/SampleWinRTMetadataAssembly.csproj index 514982407..e228feb1f 100644 --- a/src/ILCompiler.MetadataTransform/tests/SampleWinRTMetadataAssembly/SampleWinRTMetadataAssembly.csproj +++ b/src/ILCompiler.MetadataTransform/tests/SampleWinRTMetadataAssembly/SampleWinRTMetadataAssembly.csproj @@ -4,7 +4,7 @@ <OutputType>Library</OutputType> <AssemblyName>SampleWinRTMetadataAssembly</AssemblyName> <GenerateAssemblyInfo>false</GenerateAssemblyInfo> - <RunTestsForProject>false</RunTestsForProject> + <SkipTestRun>true</SkipTestRun> </PropertyGroup> <ItemGroup> diff --git a/src/ILCompiler.MetadataTransform/tests/WindowsWinRTMetadataAssembly/WindowsWinRTMetadataAssembly.csproj b/src/ILCompiler.MetadataTransform/tests/WindowsWinRTMetadataAssembly/WindowsWinRTMetadataAssembly.csproj index d6f36ace1..05853a005 100644 --- a/src/ILCompiler.MetadataTransform/tests/WindowsWinRTMetadataAssembly/WindowsWinRTMetadataAssembly.csproj +++ b/src/ILCompiler.MetadataTransform/tests/WindowsWinRTMetadataAssembly/WindowsWinRTMetadataAssembly.csproj @@ -4,7 +4,7 @@ <OutputType>Library</OutputType> <AssemblyName>WindowsWinRTMetadataAssembly</AssemblyName> <GenerateAssemblyInfo>false</GenerateAssemblyInfo> - <RunTestsForProject>false</RunTestsForProject> + <SkipTestRun>true</SkipTestRun> </PropertyGroup> <ItemGroup> diff --git a/src/ILCompiler.TypeSystem/tests/CoreTestAssembly/CoreTestAssembly.csproj b/src/ILCompiler.TypeSystem/tests/CoreTestAssembly/CoreTestAssembly.csproj index 447bf566f..efdb81aa4 100644 --- a/src/ILCompiler.TypeSystem/tests/CoreTestAssembly/CoreTestAssembly.csproj +++ b/src/ILCompiler.TypeSystem/tests/CoreTestAssembly/CoreTestAssembly.csproj @@ -5,7 +5,7 @@ <AssemblyName>CoreTestAssembly</AssemblyName> <GenerateAssemblyInfo>false</GenerateAssemblyInfo> <IsCoreAssembly>true</IsCoreAssembly> - <RunTestsForProject>false</RunTestsForProject> + <SkipTestRun>true</SkipTestRun> </PropertyGroup> <ItemGroup> <Compile Include="Canonicalization.cs" /> diff --git a/src/ILCompiler.TypeSystem/tests/ILTestAssembly/ILTestAssembly.ilproj b/src/ILCompiler.TypeSystem/tests/ILTestAssembly/ILTestAssembly.ilproj index 5d65099c4..bce9574f9 100644 --- a/src/ILCompiler.TypeSystem/tests/ILTestAssembly/ILTestAssembly.ilproj +++ b/src/ILCompiler.TypeSystem/tests/ILTestAssembly/ILTestAssembly.ilproj @@ -4,7 +4,7 @@ <PropertyGroup> <OutputType>Library</OutputType> <AssemblyName>ILTestAssembly</AssemblyName> - <RunTestsForProject>false</RunTestsForProject> + <SkipTestRun>true</SkipTestRun> </PropertyGroup> <ItemGroup> diff --git a/src/ILCompiler.TypeSystem/tests/TypeSystem.Tests.csproj b/src/ILCompiler.TypeSystem/tests/TypeSystem.Tests.csproj index 520d57c57..cd4d34c18 100644 --- a/src/ILCompiler.TypeSystem/tests/TypeSystem.Tests.csproj +++ b/src/ILCompiler.TypeSystem/tests/TypeSystem.Tests.csproj @@ -9,11 +9,11 @@ <NoWarn>$(NoWarn);NU1603</NoWarn> </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.DotNet.BuildTools.TestSuite"> - <Version>$(XunitNetcoreExtensionsVersion)</Version> + <PackageReference Include="xunit"> + <Version>$(XUnitPackageVersion)</Version> </PackageReference> - <PackageReference Include="Microsoft.xunit.netcore.extensions"> - <Version>$(XunitNetcoreExtensionsVersion)</Version> + <PackageReference Include="Microsoft.DotNet.XUnitExtensions"> + <Version>$(MicrosoftDotNetXUnitExtensionsVersion)</Version> </PackageReference> <PackageReference Include="System.Reflection.Metadata"> <Version>1.4.2</Version> diff --git a/src/ILVerification/tests/ILVerification.Tests.csproj b/src/ILVerification/tests/ILVerification.Tests.csproj index cb585d1ea..5fe81b129 100644 --- a/src/ILVerification/tests/ILVerification.Tests.csproj +++ b/src/ILVerification/tests/ILVerification.Tests.csproj @@ -3,7 +3,7 @@ <PropertyGroup> <OutputType>Library</OutputType> - <TargetFramework>netstandard1.5</TargetFramework> + <TargetFramework>netstandard2.0</TargetFramework> <IsPackable>false</IsPackable> </PropertyGroup> @@ -14,10 +14,8 @@ </ItemGroup> <ItemGroup> - <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0-preview-20170427-09" /> - <PackageReference Include="xunit" Version="2.2.0" /> - <PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" /> - <PackageReference Include="Newtonsoft.Json" Version="10.0.2" /> + <PackageReference Include="xunit" Version="$(XUnitPackageVersion)" /> + <PackageReference Include="Newtonsoft.Json" Version="9.0.1" /> </ItemGroup> <ItemGroup> diff --git a/src/System.Private.Reflection.Metadata/tests/System.Private.Reflection.Metadata.Tests.csproj b/src/System.Private.Reflection.Metadata/tests/System.Private.Reflection.Metadata.Tests.csproj index 153092dcd..08994fa92 100644 --- a/src/System.Private.Reflection.Metadata/tests/System.Private.Reflection.Metadata.Tests.csproj +++ b/src/System.Private.Reflection.Metadata/tests/System.Private.Reflection.Metadata.Tests.csproj @@ -26,8 +26,11 @@ <Compile Include="$(MetadataCommonPath)\NativeFormatReaderGen.cs" /> </ItemGroup> <ItemGroup> - <PackageReference Include="Microsoft.DotNet.BuildTools.TestSuite"> - <Version>$(XunitNetcoreExtensionsVersion)</Version> + <PackageReference Include="xunit"> + <Version>$(XUnitPackageVersion)</Version> + </PackageReference> + <PackageReference Include="Microsoft.DotNet.XUnitExtensions"> + <Version>$(MicrosoftDotNetXUnitExtensionsVersion)</Version> </PackageReference> </ItemGroup> <ItemGroup> diff --git a/src/dirs.proj b/src/dirs.proj index bc9ce5cad..2051b84e4 100644 --- a/src/dirs.proj +++ b/src/dirs.proj @@ -6,6 +6,9 @@ <ExcludeProjects Condition="'$(OSEnvironment)'!='Windows_NT'" Include="**\TypeSystem.Tests.csproj" /> <ExcludeProjects Condition="'$(OSEnvironment)'!='Windows_NT'" Include="**\ILCompiler.MetadataTransform.Tests.csproj" /> + <!-- This project required manual build step --> + <ExcludeProjects Include="**\ILVerification.Tests.csproj" /> + <Project Include="AotPackageReference\AotPackageReference.depproj" /> <Project Include="Framework\Framework.depproj" /> |