Add a runtime check for Windows.Nano to all COM related tests.
authorAaron Robinson <arobins@microsoft.com>
Fri, 26 Oct 2018 00:05:53 +0000 (17:05 -0700)
committerAaron Robinson <arobins@microsoft.com>
Fri, 26 Oct 2018 00:05:53 +0000 (17:05 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/529b22a5ff59abae958dabc34961b20ea06f3185

src/coreclr/tests/issues.targets
src/coreclr/tests/src/Interop/COM/NETClients/Aggregation/Program.cs
src/coreclr/tests/src/Interop/COM/NETClients/IDispatch/Program.cs
src/coreclr/tests/src/Interop/COM/NETClients/Primitives/Program.cs
src/coreclr/tests/src/Interop/COM/NativeClients/Primitives.csproj
src/coreclr/tests/src/Interop/common/ExeLauncherProgram.cs

index 70db067..1677c67 100644 (file)
         <ExcludeList Include="$(XunitTestBinBase)/JIT/Regression/JitBlue/GitHub_11408/GitHub_11408/*">
             <Issue>11408</Issue>
         </ExcludeList>
-        <!-- Disable COM tests since they don't properly run on Windows.Nano and at present there is no way to special case that OS flavor. -->
-        <ExcludeList Include="$(XunitTestBinBase)/Interop/COM/NETClients/Primitives/NETClientPrimitives/NETClientPrimitives.cmd">
-            <Issue>19164</Issue>
-        </ExcludeList>
-        <ExcludeList Include="$(XunitTestBinBase)/Interop/COM/NativeClients/Primitives/Primitives.cmd">
-            <Issue>19164</Issue>
-        </ExcludeList>
-        <ExcludeList Include="$(XunitTestBinBase)/Interop/COM/NETClients/IDispatch/NETClientIDispatch/NETClientIDispatch.cmd">
-            <Issue>19164</Issue>
-        </ExcludeList>
         <ExcludeList Include="$(XunitTestBinBase)/baseservices/exceptions/StackTracePreserve/StackTracePreserveTests/*">
             <Issue>20322</Issue>
         </ExcludeList>
index 4d59563..50cc761 100644 (file)
@@ -29,6 +29,12 @@ namespace NetClient
 
         static int Main(string[] doNotUse)
         {
+            // RegFree COM is not supported on Windows Nano
+            if (Utilities.IsWindowsNanoServer)
+            {
+                return 100;
+            }
+
             try
             {
                 ValidateNativeOuter();
index 58083bf..ad44b30 100644 (file)
@@ -153,6 +153,12 @@ namespace NetClient
 
         static int Main(string[] doNotUse)
         {
+            // RegFree COM is not supported on Windows Nano
+            if (Utilities.IsWindowsNanoServer)
+            {
+                return 100;
+            }
+
             try
             {
                 Validate_Numeric_In_ReturnByRef();
index cf0249a..08805b2 100644 (file)
@@ -10,6 +10,12 @@ namespace NetClient
     {
         static int Main(string[] doNotUse)
         {
+            // RegFree COM is not supported on Windows Nano
+            if (TestLibrary.Utilities.IsWindowsNanoServer)
+            {
+                return 100;
+            }
+
             try
             {
                 new NumericTests().Run();
index b9fb912..2aa9343 100644 (file)
@@ -8,6 +8,7 @@
 
     <TestUnsupportedOutsideWindows>true</TestUnsupportedOutsideWindows>
     <DisableProjectBuild Condition="'$(TargetsUnix)' == 'true'">true</DisableProjectBuild>
+    <DefineConstants>BLOCK_WINDOWS_NANO</DefineConstants>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="$(InteropCommonDir)ExeLauncherProgram.cs" />
@@ -15,6 +16,7 @@
   <ItemGroup>
     <ProjectReference Include="Primitives/CMakeLists.txt"/>
     <ProjectReference Include="../NetServer/NetServer.csproj" />
+    <ProjectReference Include="../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
   </ItemGroup>
   <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
 </Project>
\ No newline at end of file
index 7f643f3..9d4ada3 100644 (file)
@@ -22,6 +22,14 @@ public class Program
             return 100;
         }
 
+#if BLOCK_WINDOWS_NANO
+        // Not supported on Windows Nano
+        if (TestLibrary.Utilities.IsWindowsNanoServer)
+        {
+            return 100;
+        }
+#endif
+
         string workingDir = Environment.CurrentDirectory;
         Console.WriteLine($"Searching for exe to launch in {workingDir}...");