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

Clean up and consolidate HostModel tests. #97244

Merged
merged 4 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions eng/Subsets.props
Original file line number Diff line number Diff line change
Expand Up @@ -495,11 +495,9 @@

<!-- Host.tests subset (consumes live built libraries assets so needs to come after libraries) -->
<ItemGroup Condition="$(_subset.Contains('+host.tests+'))">
<TestProjectToBuild Include="$(InstallerProjectRoot)tests\Microsoft.NET.HostModel.Tests\AppHost.Bundle.Tests\AppHost.Bundle.Tests.csproj" />
<TestProjectToBuild Include="$(InstallerProjectRoot)tests\Microsoft.NET.HostModel.Tests\Microsoft.NET.HostModel.AppHost.Tests\Microsoft.NET.HostModel.AppHost.Tests.csproj" />
<TestProjectToBuild Include="$(InstallerProjectRoot)tests\Microsoft.NET.HostModel.Tests\Microsoft.NET.HostModel.Bundle.Tests\Microsoft.NET.HostModel.Bundle.Tests.csproj" />
<TestProjectToBuild Include="$(InstallerProjectRoot)tests\Microsoft.NET.HostModel.Tests\Microsoft.NET.HostModel.ComHost.Tests\Microsoft.NET.HostModel.ComHost.Tests.csproj" />
<TestProjectToBuild Include="$(InstallerProjectRoot)tests\AppHost.Bundle.Tests\AppHost.Bundle.Tests.csproj" />
<TestProjectToBuild Include="$(InstallerProjectRoot)tests\HostActivation.Tests\HostActivation.Tests.csproj" />
<TestProjectToBuild Include="$(InstallerProjectRoot)tests\Microsoft.NET.HostModel.Tests\Microsoft.NET.HostModel.Tests.csproj" />
<ProjectToBuild Include="@(TestProjectToBuild)" BuildInParallel="true" Test="true" Category="host" />
</ItemGroup>

Expand Down
104 changes: 34 additions & 70 deletions src/installer/Microsoft.DotNet.CoreSetup.sln
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtils", "tests\TestUtil
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.HostModel", "managed\Microsoft.NET.HostModel\Microsoft.NET.HostModel.csproj", "{325FB7F2-2E2E-422D-ADAA-F0B63E84CF24}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppHost.Bundle.Tests", "tests\Microsoft.NET.HostModel.Tests\AppHost.Bundle.Tests\AppHost.Bundle.Tests.csproj", "{2745A51D-3425-4F68-8349-A8B8BC27DD87}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.HostModel.Bundle.Tests", "tests\Microsoft.NET.HostModel.Tests\Microsoft.NET.HostModel.Bundle.Tests\Microsoft.NET.HostModel.Bundle.Tests.csproj", "{1E76A78E-9E39-480D-8CD3-B7D0A858FECB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.CoreSetup.Packaging.Tests", "tests\Microsoft.DotNet.CoreSetup.Packaging.Tests\Microsoft.DotNet.CoreSetup.Packaging.Tests.csproj", "{F1584324-A41A-4CE7-B23F-DB2252CFE276}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.HostModel.AppHost.Tests", "tests\Microsoft.NET.HostModel.Tests\Microsoft.NET.HostModel.AppHost.Tests\Microsoft.NET.HostModel.AppHost.Tests.csproj", "{AA3430BA-AE4A-4D52-B29D-B072A646C230}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppHost.Bundle.Tests", "tests\AppHost.Bundle.Tests\AppHost.Bundle.Tests.csproj", "{0496C031-637B-4862-B7ED-B4505E68F241}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.HostModel.ComHost.Tests", "tests\Microsoft.NET.HostModel.Tests\Microsoft.NET.HostModel.ComHost.Tests\Microsoft.NET.HostModel.ComHost.Tests.csproj", "{35EF7826-6D47-4C91-AFDF-91091C05FB13}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.HostModel.Tests", "tests\Microsoft.NET.HostModel.Tests\Microsoft.NET.HostModel.Tests.csproj", "{9212E3B2-DFCB-4A24-99AA-ED5F9ACAA87F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -85,38 +81,6 @@ Global
{325FB7F2-2E2E-422D-ADAA-F0B63E84CF24}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
{325FB7F2-2E2E-422D-ADAA-F0B63E84CF24}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
{325FB7F2-2E2E-422D-ADAA-F0B63E84CF24}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
{2745A51D-3425-4F68-8349-A8B8BC27DD87}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2745A51D-3425-4F68-8349-A8B8BC27DD87}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2745A51D-3425-4F68-8349-A8B8BC27DD87}.Debug|x64.ActiveCfg = Debug|Any CPU
{2745A51D-3425-4F68-8349-A8B8BC27DD87}.Debug|x64.Build.0 = Debug|Any CPU
{2745A51D-3425-4F68-8349-A8B8BC27DD87}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
{2745A51D-3425-4F68-8349-A8B8BC27DD87}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
{2745A51D-3425-4F68-8349-A8B8BC27DD87}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
{2745A51D-3425-4F68-8349-A8B8BC27DD87}.MinSizeRel|x64.Build.0 = Debug|Any CPU
{2745A51D-3425-4F68-8349-A8B8BC27DD87}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2745A51D-3425-4F68-8349-A8B8BC27DD87}.Release|Any CPU.Build.0 = Release|Any CPU
{2745A51D-3425-4F68-8349-A8B8BC27DD87}.Release|x64.ActiveCfg = Release|Any CPU
{2745A51D-3425-4F68-8349-A8B8BC27DD87}.Release|x64.Build.0 = Release|Any CPU
{2745A51D-3425-4F68-8349-A8B8BC27DD87}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
{2745A51D-3425-4F68-8349-A8B8BC27DD87}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
{2745A51D-3425-4F68-8349-A8B8BC27DD87}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
{2745A51D-3425-4F68-8349-A8B8BC27DD87}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
{1E76A78E-9E39-480D-8CD3-B7D0A858FECB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1E76A78E-9E39-480D-8CD3-B7D0A858FECB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1E76A78E-9E39-480D-8CD3-B7D0A858FECB}.Debug|x64.ActiveCfg = Debug|Any CPU
{1E76A78E-9E39-480D-8CD3-B7D0A858FECB}.Debug|x64.Build.0 = Debug|Any CPU
{1E76A78E-9E39-480D-8CD3-B7D0A858FECB}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
{1E76A78E-9E39-480D-8CD3-B7D0A858FECB}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
{1E76A78E-9E39-480D-8CD3-B7D0A858FECB}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
{1E76A78E-9E39-480D-8CD3-B7D0A858FECB}.MinSizeRel|x64.Build.0 = Debug|Any CPU
{1E76A78E-9E39-480D-8CD3-B7D0A858FECB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1E76A78E-9E39-480D-8CD3-B7D0A858FECB}.Release|Any CPU.Build.0 = Release|Any CPU
{1E76A78E-9E39-480D-8CD3-B7D0A858FECB}.Release|x64.ActiveCfg = Release|Any CPU
{1E76A78E-9E39-480D-8CD3-B7D0A858FECB}.Release|x64.Build.0 = Release|Any CPU
{1E76A78E-9E39-480D-8CD3-B7D0A858FECB}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
{1E76A78E-9E39-480D-8CD3-B7D0A858FECB}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
{1E76A78E-9E39-480D-8CD3-B7D0A858FECB}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
{1E76A78E-9E39-480D-8CD3-B7D0A858FECB}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
{F1584324-A41A-4CE7-B23F-DB2252CFE276}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F1584324-A41A-4CE7-B23F-DB2252CFE276}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F1584324-A41A-4CE7-B23F-DB2252CFE276}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand All @@ -133,38 +97,38 @@ Global
{F1584324-A41A-4CE7-B23F-DB2252CFE276}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
{F1584324-A41A-4CE7-B23F-DB2252CFE276}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
{F1584324-A41A-4CE7-B23F-DB2252CFE276}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
{AA3430BA-AE4A-4D52-B29D-B072A646C230}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AA3430BA-AE4A-4D52-B29D-B072A646C230}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AA3430BA-AE4A-4D52-B29D-B072A646C230}.Debug|x64.ActiveCfg = Debug|Any CPU
{AA3430BA-AE4A-4D52-B29D-B072A646C230}.Debug|x64.Build.0 = Debug|Any CPU
{AA3430BA-AE4A-4D52-B29D-B072A646C230}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
{AA3430BA-AE4A-4D52-B29D-B072A646C230}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
{AA3430BA-AE4A-4D52-B29D-B072A646C230}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
{AA3430BA-AE4A-4D52-B29D-B072A646C230}.MinSizeRel|x64.Build.0 = Debug|Any CPU
{AA3430BA-AE4A-4D52-B29D-B072A646C230}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AA3430BA-AE4A-4D52-B29D-B072A646C230}.Release|Any CPU.Build.0 = Release|Any CPU
{AA3430BA-AE4A-4D52-B29D-B072A646C230}.Release|x64.ActiveCfg = Release|Any CPU
{AA3430BA-AE4A-4D52-B29D-B072A646C230}.Release|x64.Build.0 = Release|Any CPU
{AA3430BA-AE4A-4D52-B29D-B072A646C230}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
{AA3430BA-AE4A-4D52-B29D-B072A646C230}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
{AA3430BA-AE4A-4D52-B29D-B072A646C230}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
{AA3430BA-AE4A-4D52-B29D-B072A646C230}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
{35EF7826-6D47-4C91-AFDF-91091C05FB13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{35EF7826-6D47-4C91-AFDF-91091C05FB13}.Debug|Any CPU.Build.0 = Debug|Any CPU
{35EF7826-6D47-4C91-AFDF-91091C05FB13}.Debug|x64.ActiveCfg = Debug|Any CPU
{35EF7826-6D47-4C91-AFDF-91091C05FB13}.Debug|x64.Build.0 = Debug|Any CPU
{35EF7826-6D47-4C91-AFDF-91091C05FB13}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
{35EF7826-6D47-4C91-AFDF-91091C05FB13}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
{35EF7826-6D47-4C91-AFDF-91091C05FB13}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
{35EF7826-6D47-4C91-AFDF-91091C05FB13}.MinSizeRel|x64.Build.0 = Debug|Any CPU
{35EF7826-6D47-4C91-AFDF-91091C05FB13}.Release|Any CPU.ActiveCfg = Release|Any CPU
{35EF7826-6D47-4C91-AFDF-91091C05FB13}.Release|Any CPU.Build.0 = Release|Any CPU
{35EF7826-6D47-4C91-AFDF-91091C05FB13}.Release|x64.ActiveCfg = Release|Any CPU
{35EF7826-6D47-4C91-AFDF-91091C05FB13}.Release|x64.Build.0 = Release|Any CPU
{35EF7826-6D47-4C91-AFDF-91091C05FB13}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
{35EF7826-6D47-4C91-AFDF-91091C05FB13}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
{35EF7826-6D47-4C91-AFDF-91091C05FB13}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
{35EF7826-6D47-4C91-AFDF-91091C05FB13}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
{0496C031-637B-4862-B7ED-B4505E68F241}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0496C031-637B-4862-B7ED-B4505E68F241}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0496C031-637B-4862-B7ED-B4505E68F241}.Debug|x64.ActiveCfg = Debug|Any CPU
{0496C031-637B-4862-B7ED-B4505E68F241}.Debug|x64.Build.0 = Debug|Any CPU
{0496C031-637B-4862-B7ED-B4505E68F241}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
{0496C031-637B-4862-B7ED-B4505E68F241}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
{0496C031-637B-4862-B7ED-B4505E68F241}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
{0496C031-637B-4862-B7ED-B4505E68F241}.MinSizeRel|x64.Build.0 = Debug|Any CPU
{0496C031-637B-4862-B7ED-B4505E68F241}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0496C031-637B-4862-B7ED-B4505E68F241}.Release|Any CPU.Build.0 = Release|Any CPU
{0496C031-637B-4862-B7ED-B4505E68F241}.Release|x64.ActiveCfg = Release|Any CPU
{0496C031-637B-4862-B7ED-B4505E68F241}.Release|x64.Build.0 = Release|Any CPU
{0496C031-637B-4862-B7ED-B4505E68F241}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
{0496C031-637B-4862-B7ED-B4505E68F241}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
{0496C031-637B-4862-B7ED-B4505E68F241}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
{0496C031-637B-4862-B7ED-B4505E68F241}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
{9212E3B2-DFCB-4A24-99AA-ED5F9ACAA87F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9212E3B2-DFCB-4A24-99AA-ED5F9ACAA87F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9212E3B2-DFCB-4A24-99AA-ED5F9ACAA87F}.Debug|x64.ActiveCfg = Debug|Any CPU
{9212E3B2-DFCB-4A24-99AA-ED5F9ACAA87F}.Debug|x64.Build.0 = Debug|Any CPU
{9212E3B2-DFCB-4A24-99AA-ED5F9ACAA87F}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
{9212E3B2-DFCB-4A24-99AA-ED5F9ACAA87F}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
{9212E3B2-DFCB-4A24-99AA-ED5F9ACAA87F}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
{9212E3B2-DFCB-4A24-99AA-ED5F9ACAA87F}.MinSizeRel|x64.Build.0 = Debug|Any CPU
{9212E3B2-DFCB-4A24-99AA-ED5F9ACAA87F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9212E3B2-DFCB-4A24-99AA-ED5F9ACAA87F}.Release|Any CPU.Build.0 = Release|Any CPU
{9212E3B2-DFCB-4A24-99AA-ED5F9ACAA87F}.Release|x64.ActiveCfg = Release|Any CPU
{9212E3B2-DFCB-4A24-99AA-ED5F9ACAA87F}.Release|x64.Build.0 = Release|Any CPU
{9212E3B2-DFCB-4A24-99AA-ED5F9ACAA87F}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
{9212E3B2-DFCB-4A24-99AA-ED5F9ACAA87F}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
{9212E3B2-DFCB-4A24-99AA-ED5F9ACAA87F}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
{9212E3B2-DFCB-4A24-99AA-ED5F9ACAA87F}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\TestUtils\TestUtils.csproj" />
<ProjectReference Include="..\..\..\managed\Microsoft.NET.HostModel\Microsoft.NET.HostModel.csproj" />
<ProjectReference Include="..\TestUtils\TestUtils.csproj" />
<ProjectReference Include="..\..\managed\Microsoft.NET.HostModel\Microsoft.NET.HostModel.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ private void SingleFile_Apps_Are_Serviced()
{
var singleFile = sharedTestState.App.Bundle();

// Create the servicing directory, and copy the servived DLL from service fixture to the servicing directory.
// Create the servicing directory, and copy the serviced DLL from service fixture to the servicing directory.
var serviced = sharedTestState.ServicedLibrary;
var serviceBasePath = Path.Combine(sharedTestState.App.Location, "coreservicing");
var servicePath = Path.Combine(serviceBasePath, "pkgs", serviced.Name, "1.0.0");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
<PropertyGroup>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<OutputType>Exe</OutputType>
<RuntimeIdentifier>$(TestTargetRid)</RuntimeIdentifier>
<RuntimeFrameworkVersion>$(MNAVersion)</RuntimeFrameworkVersion>
<Win32Resource>test.res</Win32Resource>
<!-- Current .NET SDK can't run CreateAppHost so disable creating AppHost on build -->
<UseAppHost>false</UseAppHost>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using FluentAssertions;
using Microsoft.DotNet.Cli.Build.Framework;
using Microsoft.DotNet.CoreSetup.Test;
using System;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;

using FluentAssertions;
using Microsoft.DotNet.Cli.Build.Framework;
using Microsoft.DotNet.CoreSetup.Test;
using Xunit;

namespace Microsoft.NET.HostModel.Tests
namespace HostActivation.Tests
{
public class AppHostUsedWithSymbolicLinks : IClassFixture<AppHostUsedWithSymbolicLinks.SharedTestState>
public class SymbolicLinks : IClassFixture<SymbolicLinks.SharedTestState>
{
private SharedTestState sharedTestState;

public AppHostUsedWithSymbolicLinks(AppHostUsedWithSymbolicLinks.SharedTestState fixture)
public SymbolicLinks(SymbolicLinks.SharedTestState fixture)
{
sharedTestState = fixture;
}
Expand Down
Loading
Loading