Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade SDK to 6.0.100-rc.1.21411.13 #57143

Merged
merged 12 commits into from
Aug 12, 2021
Merged
2 changes: 1 addition & 1 deletion eng/testing/tests.mobile.targets
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
AssemblyFile="$(RuntimeConfigParserTasksAssemblyPath)"
Condition="'$(RuntimeConfigParserTasksAssemblyPath)' != ''" />

<Target Name="GenerateRuntimeConfig" Condition="'$(OutputType)' != 'library' and '$(TargetOS)' != 'Browser'">
<Target Name="GenerateRuntimeConfig" Condition="'$(TargetOS)' != 'Browser'">
<PropertyGroup>
<RuntimeConfigFilePath>$(PublishDir)$(AssemblyName).runtimeconfig.json</RuntimeConfigFilePath>
<ParsedRuntimeConfigFilePath>$(PublishDir)runtimeconfig.bin</ParsedRuntimeConfigFilePath>
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"sdk": {
"version": "6.0.100-preview.6.21355.2",
"version": "6.0.100-rc.1.21411.28",
"allowPrerelease": true,
"rollForward": "major"
},
"tools": {
"dotnet": "6.0.100-preview.6.21355.2"
"dotnet": "6.0.100-rc.1.21411.28"
},
"native-tools": {
"cmake": "3.16.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,28 +191,6 @@ public void Put_app_directory_behind_symlink_and_use_dotnet()
.And.HaveStdOutContaining("Hello World");
}

[Fact]
[SkipOnPlatform(TestPlatforms.Windows, "Creating symbolic links requires administrative privilege on Windows, so skip test.")]
public void Put_app_directory_behind_symlink_and_use_dotnet_run()
{
var fixture = sharedTestState.StandaloneAppFixture_Published
.Copy();

var dotnet = fixture.SdkDotnet;
var binDir = fixture.TestProject.OutputDirectory;
var binDirNewPath = Path.Combine(Directory.GetParent(fixture.TestProject.Location).ToString(), "PutTheBinDirSomewhereElse");
Directory.Move(binDir, binDirNewPath);

using var symlink = new SymLink(binDir, binDirNewPath);
dotnet.Exec("run")
.WorkingDirectory(fixture.TestProject.Location)
.CaptureStdErr()
.CaptureStdOut()
.Execute()
.Should().Pass()
.And.HaveStdOutContaining("Hello World");
}

[Fact]
// If enabled, this tests will need to set the console code page to output unicode characters: Command.Create("chcp 65001").Execute();
[SkipOnPlatform(TestPlatforms.Windows, "Creating symbolic links requires administrative privilege on Windows, so skip test.")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ private string RelativePath(string path)
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/57242", TestPlatforms.OSX)]
public void TestWithAbsolutePaths()
{
var fixture = sharedTestState.TestFixture.Copy();
Expand All @@ -108,6 +109,7 @@ public void TestWithAbsolutePaths()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/57242", TestPlatforms.OSX)]
public void TestWithRelativePaths()
{
var fixture = sharedTestState.TestFixture.Copy();
Expand All @@ -116,6 +118,7 @@ public void TestWithRelativePaths()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/57242", TestPlatforms.OSX)]
public void TestWithRelativePathsDirSeparator()
{
var fixture = sharedTestState.TestFixture.Copy();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
<OutputType>Exe</OutputType>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<StaticWebAssetsEnabled>false</StaticWebAssetsEnabled>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lewing thanks for the heads up. It's fixed in dotnet/sdk#19482

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's fixed in the SDK do we need to remove these now?

Copy link
Member

@lewing lewing Aug 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I'll revert the workarounds

</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<TargetFramework>$(AspNetCoreAppCurrent)</TargetFramework>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
<OutputType>Exe</OutputType>
<StaticWebAssetsEnabled>false</StaticWebAssetsEnabled>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<TargetFramework>net6.0</TargetFramework>
<LangVersion>preview</LangVersion>
<Nullable>enable</Nullable>
<StaticWebAssetsEnabled>false</StaticWebAssetsEnabled>
</PropertyGroup>

<ItemGroup>
Expand Down
7 changes: 0 additions & 7 deletions src/libraries/System.Runtime.Loader/tests/ApplyUpdateTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,5 @@ public static void IsSupported()
bool result = MetadataUpdater.IsSupported;
Assert.False(result);
}

[ConditionalFact(typeof(ApplyUpdateUtil), nameof(ApplyUpdateUtil.TestUsingLaunchEnvironment))]
public static void IsSupported2()
{
bool result = MetadataUpdater.IsSupported;
Assert.True(result);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<!-- these tests depend on the pdb files. Causes test failures like:
[FAIL] System.Text.Json.Tests.DebuggerTests.DefaultJsonElement -->
<DebuggerSupport Condition="'$(DebuggerSupport)' == '' and '$(TargetOS)' == 'Browser'">true</DebuggerSupport>
<!-- Needed for JsonSerializerOptionsUpdateHandler tests -->
<MetadataUpdaterSupport Condition="'$(MetadataUpdaterSupport)' == '' and '$(TargetOS)' == 'Browser'">true</MetadataUpdaterSupport>
<WasmXHarnessArgs>$(WasmXHarnessArgs) --timeout=1800</WasmXHarnessArgs>
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<StaticWebAssetsEnabled>false</StaticWebAssetsEnabled>
<TargetFramework>$(AspNetCoreAppCurrent)</TargetFramework>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<NoWarn>$(NoWarn),CA2007</NoWarn>
Expand Down
28 changes: 24 additions & 4 deletions src/tests/tracing/eventpipe/processinfo/processinfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Diagnostics.Tools.RuntimeClient;
Expand Down Expand Up @@ -55,10 +56,29 @@ public static string NormalizeCommandLine(string cmdline)
}
}

string normalizedCommandLine = parts
.Where(part => !string.IsNullOrWhiteSpace(part))
.Select(part => (new FileInfo(part)).FullName)
.Aggregate((s1, s2) => string.Join(' ', s1, s2));
StringBuilder sb = new();
bool isArgument = false;
for (int i = 0; i < parts.Count; i++)
{
if (string.IsNullOrEmpty(parts[i]))
continue;
else if (parts[i].StartsWith('-'))
{
// if we see '-', then assume it's a '-option argument' pair and remove
isArgument = true;
}
else if (isArgument)
{
isArgument = false;
}
else
{
// assume anything else is a file/executable so get the full path
sb.Append((new FileInfo(parts[i])).FullName + " ");
}
}

string normalizedCommandLine = sb.ToString().Trim();

// Tests are run out of /tmp on Mac and linux, but on Mac /tmp is actually a symlink that points to /private/tmp.
// This isn't represented in the output from FileInfo.FullName unfortunately, so we'll fake that completion in that case.
Expand Down
28 changes: 24 additions & 4 deletions src/tests/tracing/eventpipe/processinfo2/processinfo2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using System.Linq;
using System.Runtime.InteropServices;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Diagnostics.Tools.RuntimeClient;
Expand Down Expand Up @@ -56,10 +57,29 @@ public static string NormalizeCommandLine(string cmdline)
}
}

string normalizedCommandLine = parts
.Where(part => !string.IsNullOrWhiteSpace(part))
.Select(part => (new FileInfo(part)).FullName)
.Aggregate((s1, s2) => string.Join(' ', s1, s2));
StringBuilder sb = new();
bool isArgument = false;
for (int i = 0; i < parts.Count; i++)
{
if (string.IsNullOrEmpty(parts[i]))
continue;
else if (parts[i].StartsWith('-'))
{
// if we see '-', then assume it's a '-option argument' pair and remove
isArgument = true;
}
else if (isArgument)
{
isArgument = false;
}
else
{
// assume anything else is a file/executable so get the full path
sb.Append((new FileInfo(parts[i])).FullName + " ");
}
}

string normalizedCommandLine = sb.ToString().Trim();

// Tests are run out of /tmp on Mac and linux, but on Mac /tmp is actually a symlink that points to /private/tmp.
// This isn't represented in the output from FileInfo.FullName unfortunately, so we'll fake that completion in that case.
Expand Down