From 466a08526a28415ed3d370d062096ae207929992 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexander=20K=C3=B6plinger?= Date: Fri, 10 Jul 2020 21:10:03 +0200 Subject: [PATCH] WASM: Disable tests for System.Diagnostics.Process and .FileVersionInfo (#39088) Both of these libraries throw PNSE on WebAssembly. --- .../tests/System.Diagnostics.FileVersionInfo.Tests/AssemblyInfo.cs | 6 ++++++ .../System.Diagnostics.FileVersionInfo.Tests.csproj | 4 +++- .../tests/{XunitAssemblyAttributes.cs => AssemblyInfo.cs} | 2 ++ .../tests/System.Diagnostics.Process.Tests.csproj | 5 +++-- 4 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 src/libraries/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/AssemblyInfo.cs rename src/libraries/System.Diagnostics.Process/tests/{XunitAssemblyAttributes.cs => AssemblyInfo.cs} (77%) diff --git a/src/libraries/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/AssemblyInfo.cs b/src/libraries/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/AssemblyInfo.cs new file mode 100644 index 0000000..85b21b9 --- /dev/null +++ b/src/libraries/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/AssemblyInfo.cs @@ -0,0 +1,6 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Xunit; + +[assembly: SkipOnMono("System.Diagnostics.FileVersionInfo is not supported on wasm.", TestPlatforms.Browser)] diff --git a/src/libraries/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/System.Diagnostics.FileVersionInfo.Tests.csproj b/src/libraries/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/System.Diagnostics.FileVersionInfo.Tests.csproj index dfc86e5..ad26918 100644 --- a/src/libraries/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/System.Diagnostics.FileVersionInfo.Tests.csproj +++ b/src/libraries/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/System.Diagnostics.FileVersionInfo.Tests.csproj @@ -2,6 +2,7 @@ $(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Browser true + true @@ -20,6 +21,7 @@ + @@ -28,7 +30,7 @@ - + diff --git a/src/libraries/System.Diagnostics.Process/tests/XunitAssemblyAttributes.cs b/src/libraries/System.Diagnostics.Process/tests/AssemblyInfo.cs similarity index 77% rename from src/libraries/System.Diagnostics.Process/tests/XunitAssemblyAttributes.cs rename to src/libraries/System.Diagnostics.Process/tests/AssemblyInfo.cs index f025a31..ae8def5 100644 --- a/src/libraries/System.Diagnostics.Process/tests/XunitAssemblyAttributes.cs +++ b/src/libraries/System.Diagnostics.Process/tests/AssemblyInfo.cs @@ -6,3 +6,5 @@ using Xunit; // Process tests can conflict with each other, as they modify ambient state // like the console code page and environment variables [assembly: CollectionBehavior(CollectionBehavior.CollectionPerAssembly)] + +[assembly: SkipOnMono("System.Diagnostics.Process is not supported on wasm.", TestPlatforms.Browser)] diff --git a/src/libraries/System.Diagnostics.Process/tests/System.Diagnostics.Process.Tests.csproj b/src/libraries/System.Diagnostics.Process/tests/System.Diagnostics.Process.Tests.csproj index da4069e..83b1298 100644 --- a/src/libraries/System.Diagnostics.Process/tests/System.Diagnostics.Process.Tests.csproj +++ b/src/libraries/System.Diagnostics.Process/tests/System.Diagnostics.Process.Tests.csproj @@ -4,6 +4,7 @@ $(DefineConstants);TargetsWindows true $(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Browser + true - + @@ -37,7 +38,7 @@ - +