diff options
author | Davis Goodin <dagood@microsoft.com> | 2016-02-23 14:37:36 -0600 |
---|---|---|
committer | Davis Goodin <dagood@microsoft.com> | 2016-03-02 12:32:03 -0600 |
commit | 0d71a87375bfa54af10b68b74a4c8d93430ed308 (patch) | |
tree | c19ee951b6aa6bdd9be63d609e46b223ed284782 | |
parent | 28c6b8dacf69d374a4ac5d6a49d7f67d899c0454 (diff) | |
download | coreclr-0d71a87375bfa54af10b68b74a4c8d93430ed308.tar.gz coreclr-0d71a87375bfa54af10b68b74a4c8d93430ed308.tar.bz2 coreclr-0d71a87375bfa54af10b68b74a4c8d93430ed308.zip |
Upgrade CLI version and buildtools, and make build file changes.
Unset CORE_ROOT in environment on Windows before doing restore so that dotnet CLI doesn't try to run using binaries from the test CORE_ROOT.
Restore the xunit wrapper projects in a batch rather than individually to save a lot of time.
Work around xunit.runner.msbuild not having compatible package layout by ignoring errors and adding import so that a future fix will work.
Hard-code C# language for generated wrapper projects: the $(Language) property wasn't set.
Also Change www.myget.org to dotnet.myget.org, as we switched to enterprise myget.
Add System.ObjectModel to tests\src\JIT\config\benchmark+serialize\project.json to manually upgrade it to a version that doesn't require lifting for runtime. This fixes System.ObjectModel.dll being missing from CORE_ROOT and causing the test to fail.
Switch to v3 nuget feeds and sync NuGet.Configs.
-rw-r--r-- | DotnetCLIVersion.txt | 2 | ||||
-rw-r--r-- | build.proj | 2 | ||||
-rw-r--r-- | dir.props | 6 | ||||
-rw-r--r-- | init-tools.cmd | 2 | ||||
-rwxr-xr-x | init-tools.sh | 2 | ||||
-rw-r--r-- | src/NuGet.Config | 3 | ||||
-rw-r--r-- | tests/build.proj | 12 | ||||
-rw-r--r-- | tests/dir.props | 15 | ||||
-rw-r--r-- | tests/runtest.proj | 26 | ||||
-rw-r--r-- | tests/src/JIT/config/benchmark+serialize/project.json | 1 | ||||
-rw-r--r-- | tests/src/NuGet.Config | 4 |
11 files changed, 48 insertions, 27 deletions
diff --git a/DotnetCLIVersion.txt b/DotnetCLIVersion.txt index 8e793aebfa..c916191a1e 100644 --- a/DotnetCLIVersion.txt +++ b/DotnetCLIVersion.txt @@ -1 +1 @@ -1.0.0.000973
\ No newline at end of file +1.0.0.001504
\ No newline at end of file diff --git a/build.proj b/build.proj index 7202143088..d37eaff73e 100644 --- a/build.proj +++ b/build.proj @@ -17,7 +17,7 @@ </Target> <Target Name="RestoreNETCorePlatforms" AfterTargets="Build"> - <Exec Command="$(DnuRestoreCommand) $(SourceDir).nuget/init/project.json --source https://www.myget.org/F/dotnet-core/" /> + <Exec Command="$(DnuRestoreCommand) $(SourceDir).nuget/init/project.json --source https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" /> </Target> </Project>
\ No newline at end of file @@ -95,10 +95,12 @@ <DotnetToolCommand Condition="'$(DotnetToolCommand)'=='' and '$(OsEnvironment)'!='Unix'">$(DotnetCliPath)dotnet.exe</DotnetToolCommand> <DotnetToolCommand Condition="'$(DotnetToolCommand)'=='' and '$(OsEnvironment)'=='Unix'">$(DotnetCliPath)dotnet</DotnetToolCommand> - <DnuRestoreCommand>"$(DotnetToolCommand)"</DnuRestoreCommand> + <!-- If CORE_ROOT is set on Windows, the dotnet CLI tool tries to use it. This results in DLL resolution errors. Unset CORE_ROOT during restore. --> + <DnuRestoreCommand Condition="'$(OsEnvironment)'!='Unix'">(set CORE_ROOT=) &</DnuRestoreCommand> + + <DnuRestoreCommand>$(DnuRestoreCommand) "$(DotnetToolCommand)"</DnuRestoreCommand> <DnuRestoreCommand>$(DnuRestoreCommand) restore</DnuRestoreCommand> <DnuRestoreCommand>$(DnuRestoreCommand) --packages "$(PackagesDir.TrimEnd('\\'))"</DnuRestoreCommand> - <DnuRestoreCommand Condition="'$(LockDependencies)' == 'true'">$(DnuRestoreCommand) --lock</DnuRestoreCommand> </PropertyGroup> <!-- Setup Nuget properties --> diff --git a/init-tools.cmd b/init-tools.cmd index 0d41e3b006..af77c7bcd2 100644 --- a/init-tools.cmd +++ b/init-tools.cmd @@ -47,7 +47,7 @@ echo Installing dotnet cli... if NOT exist "%DOTNET_PATH%" mkdir "%DOTNET_PATH%" set /p DOTNET_VERSION=< %~dp0DotnetCLIVersion.txt set DOTNET_ZIP_NAME=dotnet-win-x64.%DOTNET_VERSION%.zip -set DOTNET_REMOTE_PATH=https://dotnetcli.blob.core.windows.net/dotnet/dev/Binaries/%DOTNET_VERSION%/%DOTNET_ZIP_NAME% +set DOTNET_REMOTE_PATH=https://dotnetcli.blob.core.windows.net/dotnet/beta/Binaries/%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 "(New-Object Net.WebClient).DownloadFile('%DOTNET_REMOTE_PATH%', '%DOTNET_LOCAL_PATH%'); 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% diff --git a/init-tools.sh b/init-tools.sh index 8a3d1a8ca8..f57991e6e4 100755 --- a/init-tools.sh +++ b/init-tools.sh @@ -73,7 +73,7 @@ if [ "$__DistroName" == "rhel" ]; then __DOTNET_PKG=dotnet-centos-x64 fi -__CLIDownloadURL=https://dotnetcli.blob.core.windows.net/dotnet/dev/Binaries/${__DOTNET_TOOLS_VERSION}/${__DOTNET_PKG}.${__DOTNET_TOOLS_VERSION}.tar.gz +__CLIDownloadURL=https://dotnetcli.blob.core.windows.net/dotnet/beta/Binaries/${__DOTNET_TOOLS_VERSION}/${__DOTNET_PKG}.${__DOTNET_TOOLS_VERSION}.tar.gz echo ".NET CLI will be downloaded from $__CLIDownloadURL" if [ ! -e $__PROJECT_JSON_FILE ]; then diff --git a/src/NuGet.Config b/src/NuGet.Config index e821d142f2..0054b4914e 100644 --- a/src/NuGet.Config +++ b/src/NuGet.Config @@ -4,9 +4,8 @@ <add key="enabled" value="True" /> </packageRestore> <packageSources> - <add key="myget.org dotnet-buildtools" value="https://www.myget.org/F/dotnet-buildtools/" /> + <add key="myget.org dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" /> <add key="nuget.org" value="https://www.nuget.org/api/v2/" /> - <add key="myget.org dotnet-core" value="https://www.myget.org/F/dotnet-core/" /> </packageSources> <activePackageSource> <add key="All" value="(Aggregate source)" /> diff --git a/tests/build.proj b/tests/build.proj index 0130c5edd4..ca3896d2ea 100644 --- a/tests/build.proj +++ b/tests/build.proj @@ -18,9 +18,15 @@ </PropertyGroup> <Target Name="BatchRestorePackages"> - <Message Importance="High" Text="Restoring all packages..." /> - <!-- restore all project.jsons in one pass for perf & to avoid concurrency problems with dnu --> - <Exec Command="$(DnuRestoreCommand) $(DnuRestoreDirs)" StandardOutputImportance="Low" CustomErrorRegularExpression="^Unable to locate .*" /> + <Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Restoring all packages..." /> + + <!-- restore all project.jsons in one pass for perf & to avoid concurrency problems --> + <Exec Command="$(DnuRestoreCommand) $(DnuRestoreDirs)" + StandardOutputImportance="Low" + CustomErrorRegularExpression="^Unable to locate .*" + ContinueOnError="WarnAndContinue" /> + + <Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Restoring all packages...Done." /> </Target> <!-- Override RestorePackages from dir.traversal.targets and do a batch restore --> diff --git a/tests/dir.props b/tests/dir.props index 2697ba1a11..d0f3e35e1d 100644 --- a/tests/dir.props +++ b/tests/dir.props @@ -51,11 +51,9 @@ <!-- list of nuget package sources passed to dnu --> <ItemGroup> <!-- Need to escape double forward slash (%2F) or MSBuild will normalize to one slash on Unix. --> - <DnuSourceList Include="https:%2F%2Fwww.myget.org/F/dotnet-core/" /> - <DnuSourceList Include="https:%2F%2Fwww.myget.org/F/dotnet-corefxtestdata/" /> - <DnuSourceList Include="https:%2F%2Fwww.myget.org/F/dotnet-buildtools/" /> - <DnuSourceList Include="https:%2F%2Fwww.myget.org/F/nugetbuild/" /> - <DnuSourceList Include="https:%2F%2Fwww.nuget.org/api/v2/" /> + <DnuSourceList Include="https:%2F%2Fdotnet.myget.org/F/dotnet-core/api/v3/index.json" /> + <DnuSourceList Include="https:%2F%2Fwww.myget.org/F/nugetbuild/api/v3/index.json" /> + <DnuSourceList Include="https:%2F%2Fapi.nuget.org/v3/index.json" /> </ItemGroup> @@ -76,11 +74,12 @@ <DnuRestoreSource>@(DnuSourceList -> '--source %(Identity)', ' ')</DnuRestoreSource> <DnuRestoreDirs>@(DnuRestoreDir -> '%(Identity)', ' ')</DnuRestoreDirs> - <DnuRestoreCommand>"$(DotnetToolCommand)"</DnuRestoreCommand> + <!-- If CORE_ROOT is set on Windows, the dotnet CLI tool tries to use it. This results in DLL resolution errors. Unset CORE_ROOT during restore. --> + <DnuRestoreCommand Condition="'$(OsEnvironment)'!='Unix'">(set CORE_ROOT=) &</DnuRestoreCommand> + + <DnuRestoreCommand>$(DnuRestoreCommand) "$(DotnetToolCommand)"</DnuRestoreCommand> <DnuRestoreCommand>$(DnuRestoreCommand) restore</DnuRestoreCommand> <DnuRestoreCommand>$(DnuRestoreCommand) --packages "$(PackagesDir.TrimEnd('/\'.ToCharArray()))" $(DnuRestoreSource)</DnuRestoreCommand> - <DnuRestoreCommand Condition="'$(LockDependencies)' == 'true'">$(DnuRestoreCommand) --lock</DnuRestoreCommand> - </PropertyGroup> <!-- Which tests shall we build? Default: Priority 0 tests. diff --git a/tests/runtest.proj b/tests/runtest.proj index 33507aead0..f882a466ea 100644 --- a/tests/runtest.proj +++ b/tests/runtest.proj @@ -84,7 +84,6 @@ $(_XunitEpilog) <FileAlignment>512</FileAlignment> <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <SolutionDir Condition="%24(SolutionDir) == '' Or %24(SolutionDir) == '*Undefined*'">..\..\</SolutionDir> - <RestorePackages>true</RestorePackages> <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp> <CLRTestKind>BuildOnly</CLRTestKind> <IsTestProject>true</IsTestProject> @@ -132,7 +131,9 @@ $(_XunitEpilog) "xunit.runner.msbuild": "2.1.0" }, "frameworks": { - "net45": {} + "net45": { + "imports": "portable-net45+win8" + } } } ]]> @@ -160,9 +161,11 @@ $(_XunitEpilog) File="$(XunitWrapperSrcDir)\project.json" Lines="$(XunitWrapperGenPackConfig)" Overwrite="true" /> - - <MSBuild Projects="$(XunitWrapperSrcDir)\$(XunitWrapper).csproj" /> - + </Target> + + <Target Name="BuildXunitWrapper"> + <MSBuild Projects="$(XunitWrapperSrcDir)\$(XunitWrapper).csproj" + Properties="RestorePackages=false"/> </Target> <Target Name="CreateXunitFacts"> @@ -299,6 +302,16 @@ namespace $([System.String]::Copy($(Category)).Replace(".","_").Replace("\",""). <Target Name="CreateAllWrappers" DependsOnTargets="GetListOfTestCmds;FindCmdDirectories"> <MSBuild Projects="$(MSBuildProjectFile)" Targets="CreateXunitWrapper" Properties="_CMDDIR=%(TestDirectories.Identity)" /> + + <Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Restoring all packages..." /> + <!-- Restore all wrapper projects' project.jsons in one pass for perf & to avoid concurrency problems --> + <Exec Command="$(DnuRestoreCommand) "$(XunitWrapperGeneratedCSDirBase.TrimEnd('\\'))"" + StandardOutputImportance="Low" + CustomErrorRegularExpression="^Unable to locate .*" + ContinueOnError="WarnAndContinue" /> + <Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Restoring all packages...Done." /> + + <MSBuild Projects="$(MSBuildProjectFile)" Targets="BuildXunitWrapper" Properties="_CMDDIR=%(TestDirectories.Identity)" /> </Target> <Target Name="GetListOfTestCmds"> @@ -312,7 +325,8 @@ namespace $([System.String]::Copy($(Category)).Replace(".","_").Replace("\",""). <Target Name="CreateTestOverlay"> <MSBuild Projects="$(MSBuildProjectFile)" - Targets="CopyDependecyToCoreRoot"/> + Targets="CopyDependecyToCoreRoot" + Properties="Language=C#" /> </Target> <!-- All the test projects need to add dependency to currently built runtime as they require that to run. diff --git a/tests/src/JIT/config/benchmark+serialize/project.json b/tests/src/JIT/config/benchmark+serialize/project.json index c5a44f3b1b..1a42750c63 100644 --- a/tests/src/JIT/config/benchmark+serialize/project.json +++ b/tests/src/JIT/config/benchmark+serialize/project.json @@ -6,6 +6,7 @@ "System.Runtime": "4.0.20-beta-*", "System.Console": "4.0.0-beta-*", "System.IO": "4.0.10", + "System.ObjectModel": "4.0.10", "System.Runtime.Serialization.Json": "4.0.0", "System.Runtime.Serialization.Primitives": "4.0.10", "System.Runtime.Serialization.Xml": "4.0.10", diff --git a/tests/src/NuGet.Config b/tests/src/NuGet.Config index 20e6284454..081afc6363 100644 --- a/tests/src/NuGet.Config +++ b/tests/src/NuGet.Config @@ -5,8 +5,8 @@ </packageRestore> <packageSources> <clear/> - <add key="myget.org dotnet-corefx" value="https://www.myget.org/F/dotnet-core/" /> - <add key="myget.org dotnet-buildtools" value="https://www.myget.org/F/dotnet-buildtools/" /> + <add key="myget.org dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" /> + <add key="myget.org nugetbuild" value="https://www.myget.org/F/nugetbuild/api/v3/index.json" /> <add key="nuget.org" value="https://www.nuget.org/api/v2/" /> </packageSources> <activePackageSource> |