This commit is contained in:
Jonathon Marolf 2019-09-18 11:30:11 -07:00
Родитель 3bd9f66089
Коммит 95f2a74c8c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 343F624A3A3DA80C
3 изменённых файлов: 45 добавлений и 6 удалений

3
Test.cmd Normal file
Просмотреть файл

@ -0,0 +1,3 @@
@echo off
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\common\Build.ps1""" -test %*"
exit /b %ErrorLevel%

36
eng/restore-toolset.ps1 Normal file
Просмотреть файл

@ -0,0 +1,36 @@
function InitializeCustomSDKToolset {
if (-not $restore) {
return
}
# Turn off MSBuild Node re-use
$env:MSBUILDDISABLENODEREUSE=1
# Workaround for the sockets issue when restoring with many nuget feeds.
$env:DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER=0
# Enable vs test console logging
$env:VSTEST_BUILD_TRACE=1
$env:VSTEST_TRACE_BUILD=1
$env:DOTNET_CLI_TELEMETRY_PROFILE='$env:DOTNET_CLI_TELEMETRY_PROFILE;https://github.com/dotnet/try-convert'
$cli = InitializeDotnetCli -install:$true
InstallDotNetSharedFramework "2.2.5"
}
function InstallDotNetSharedFramework([string]$version) {
$dotnetRoot = $env:DOTNET_INSTALL_DIR
$fxDir = Join-Path $dotnetRoot "shared\Microsoft.NETCore.App\$version"
if (!(Test-Path $fxDir)) {
$installScript = GetDotNetInstallScript $dotnetRoot
& $installScript -Version $version -InstallDir $dotnetRoot -Runtime "dotnet"
if($lastExitCode -ne 0) {
Write-Output "Failed to install Shared Framework $version. Ignoring failure as not all distros carrie all versions of the framework."
}
}
}
InitializeCustomSDKToolset

Просмотреть файл

@ -14,8 +14,8 @@ namespace SmokeTests
public void ConvertsLegacyFSharpConsole()
{
MSBuildUtilities.HookAssemblyResolveForMSBuild(@"C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin");
var projectToConvertPath = Path.Combine("..", "..", "..", "..", "TestData", "SmokeTests.LegacyFSharpConsole", "SmokeTests.LegacyFSharpConsole.fsproj");
var projectBaselinePath = Path.Combine("..", "..", "..", "..", "TestData", "SmokeTests.FSharpConsoleBaseline", "SmokeTests.FSharpConsoleBaseline.fsproj");
var projectToConvertPath = Path.Combine("..", "..", "..", "..", "..", "tests", "TestData", "SmokeTests.LegacyFSharpConsole", "SmokeTests.LegacyFSharpConsole.fsproj");
var projectBaselinePath = Path.Combine("..", "..", "..", "..", "..", "tests","TestData", "SmokeTests.FSharpConsoleBaseline", "SmokeTests.FSharpConsoleBaseline.fsproj");
AssertConversionWorks(projectToConvertPath, projectBaselinePath);
}
@ -23,8 +23,8 @@ namespace SmokeTests
public void ConvertsWpfFrameworkTemplate()
{
MSBuildUtilities.HookAssemblyResolveForMSBuild(@"C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin");
var projectToConvertPath = Path.Combine("..", "..", "..", "..", "TestData", "SmokeTests.WpfFramework", "SmokeTests.WpfFramework.csproj");
var projectBaselinePath = Path.Combine("..", "..", "..", "..", "TestData", "SmokeTests.WpfCoreBaseline", "SmokeTests.WpfCoreBaseline.csproj");
var projectToConvertPath = Path.Combine("..", "..", "..", "..","..", "tests", "TestData", "SmokeTests.WpfFramework", "SmokeTests.WpfFramework.csproj");
var projectBaselinePath = Path.Combine("..", "..", "..", "..", "..", "tests","TestData", "SmokeTests.WpfCoreBaseline", "SmokeTests.WpfCoreBaseline.csproj");
AssertConversionWorks(projectToConvertPath, projectBaselinePath);
}
@ -33,8 +33,8 @@ namespace SmokeTests
public void ConvertsWinformsFrameworkTemplate()
{
MSBuildUtilities.HookAssemblyResolveForMSBuild(@"C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin");
var projectToConvertPath = Path.Combine("..", "..", "..", "..", "TestData", "SmokeTests.WinformsFramework", "SmokeTests.WinformsFramework.csproj");
var projectBaselinePath = Path.Combine("..", "..", "..", "..", "TestData", "SmokeTests.WinformsCoreBaseline", "SmokeTests.WinformsCoreBaseline.csproj");
var projectToConvertPath = Path.Combine("..", "..", "..", "..", "..", "tests","TestData", "SmokeTests.WinformsFramework", "SmokeTests.WinformsFramework.csproj");
var projectBaselinePath = Path.Combine("..", "..", "..", "..", "..", "tests","TestData", "SmokeTests.WinformsCoreBaseline", "SmokeTests.WinformsCoreBaseline.csproj");
AssertConversionWorks(projectToConvertPath, projectBaselinePath);
}