Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Prev Previous commit
Next Next commit
Add unloading test for IUnknownTest
  • Loading branch information
janvorli committed Nov 29, 2018
commit 4e53c700d42948ae21ee9624aedb618d1a790664
2 changes: 1 addition & 1 deletion tests/src/Interop/MarshalAPI/IUnknown/IUnknownTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</CodeAnalysisDependentAssemblyPaths>
</ItemGroup>
<ItemGroup>
<Compile Include="*.cs" />
<Compile Include="IUnknownTest.cs" />
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
Expand Down
45 changes: 45 additions & 0 deletions tests/src/Interop/MarshalAPI/IUnknown/IUnknownTestInALC.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<AssemblyName>IUnknownTestInALC</AssemblyName>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{F1E66554-8C8E-4141-85CF-D0CD6A0CD0B0}</ProjectGuid>
<OutputType>Exe</OutputType>
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>

<DefineConstants>$(DefineConstants);STATIC</DefineConstants>

<!-- Test unsupported outside of windows -->
<TestUnsupportedOutsideWindows>true</TestUnsupportedOutsideWindows>
<DisableProjectBuild Condition="'$(TargetsUnix)' == 'true'">true</DisableProjectBuild>
</PropertyGroup>
<!-- Default configurations to help VS understand the configurations -->
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
</PropertyGroup>
<ItemGroup>
<CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
<Visible>False</Visible>
</CodeAnalysisDependentAssemblyPaths>
</ItemGroup>
<ItemGroup>
<Compile Include="TestInALC.cs" />
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Common\CoreCLRTestLibrary\CoreCLRTestLibrary.csproj">
<Project>{c8c0dc74-fac4-45b1-81fe-70c4808366e0}</Project>
<Name>CoreCLRTestLibrary</Name>
</ProjectReference>
<ProjectReference Include="IUnknownTest.csproj" />
<ProjectReference Include="CMakeLists.txt" />
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>
19 changes: 19 additions & 0 deletions tests/src/Interop/MarshalAPI/IUnknown/TestInALC.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.IO;
using System.Reflection;

namespace TestInALC
{
class Test
{
static int Main(string[] args)
{
string currentAssemblyDirectory = Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).AbsolutePath);
string testAssemblyFullPath = Path.Combine(currentAssemblyDirectory, "IUnknownTest.exe");
return TestLibrary.Utilities.ExecuteAndUnload(testAssemblyFullPath, args);
}
}
}