Merge pull request #1460 from dotnet-maestro-bot/merge/release/2.2-to-master
[automated] Merge branch 'release/2.2' => 'master'
This commit is contained in:
commit
78b1f77d04
|
|
@ -5,7 +5,7 @@
|
||||||
/*
|
/*
|
||||||
* AspNetCore module trace events layout
|
* AspNetCore module trace events layout
|
||||||
* Uncomment the following class to run mof2trace to generate header file
|
* Uncomment the following class to run mof2trace to generate header file
|
||||||
* comment it back before checking it in */
|
* comment it back before checking it in
|
||||||
[Dynamic,
|
[Dynamic,
|
||||||
Description("IIS: WWW Server"),
|
Description("IIS: WWW Server"),
|
||||||
Guid("{3a2a4e84-4c21-4981-ae10-3fda0d9b0f83}"),
|
Guid("{3a2a4e84-4c21-4981-ae10-3fda0d9b0f83}"),
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
||||||
PoolEnvironmentVariables = 4,
|
PoolEnvironmentVariables = 4,
|
||||||
ShutdownToken = 8,
|
ShutdownToken = 8,
|
||||||
DynamicCompression = 16,
|
DynamicCompression = 16,
|
||||||
ApplicationInitialization = 32
|
ApplicationInitialization = 32,
|
||||||
|
TracingModule = 64
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests;
|
||||||
|
using Microsoft.AspNetCore.Testing;
|
||||||
|
using Microsoft.AspNetCore.Testing.xunit;
|
||||||
|
using Xunit;
|
||||||
|
|
||||||
|
namespace IIS.FunctionalTests
|
||||||
|
{
|
||||||
|
public class MofFileTests
|
||||||
|
{
|
||||||
|
[ConditionalFact]
|
||||||
|
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
||||||
|
[RequiresIIS(IISCapability.TracingModule)]
|
||||||
|
public void CheckMofFile()
|
||||||
|
{
|
||||||
|
var path = Path.Combine(TestPathUtilities.GetSolutionRootDirectory("IISIntegration"), "src", "aspnetcoremodulev2", "aspnetcore", "ancm.mof");
|
||||||
|
var process = Process.Start("mofcomp.exe", path);
|
||||||
|
process.WaitForExit();
|
||||||
|
Assert.Equal(0, process.ExitCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -23,6 +23,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
||||||
private static readonly bool _poolEnvironmentVariablesAvailable;
|
private static readonly bool _poolEnvironmentVariablesAvailable;
|
||||||
private static readonly bool _dynamicCompressionAvailable;
|
private static readonly bool _dynamicCompressionAvailable;
|
||||||
private static readonly bool _applicationInitializationModule;
|
private static readonly bool _applicationInitializationModule;
|
||||||
|
private static readonly bool _tracingModuleAvailable;
|
||||||
|
|
||||||
static RequiresIISAttribute()
|
static RequiresIISAttribute()
|
||||||
{
|
{
|
||||||
|
|
@ -87,6 +88,8 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
||||||
|
|
||||||
_applicationInitializationModule = File.Exists(Path.Combine(Environment.SystemDirectory, "inetsrv", "warmup.dll"));
|
_applicationInitializationModule = File.Exists(Path.Combine(Environment.SystemDirectory, "inetsrv", "warmup.dll"));
|
||||||
|
|
||||||
|
_tracingModuleAvailable = File.Exists(Path.Combine(Environment.SystemDirectory, "inetsrv", "iisetw.dll"));
|
||||||
|
|
||||||
var iisRegistryKey = Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\InetStp", writable: false);
|
var iisRegistryKey = Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\InetStp", writable: false);
|
||||||
if (iisRegistryKey == null)
|
if (iisRegistryKey == null)
|
||||||
{
|
{
|
||||||
|
|
@ -157,6 +160,15 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
||||||
SkipReason += "The machine does not have IIS ApplicationInitialization installed.";
|
SkipReason += "The machine does not have IIS ApplicationInitialization installed.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (capabilities.HasFlag(IISCapability.TracingModule))
|
||||||
|
{
|
||||||
|
IsMet &= _tracingModuleAvailable;
|
||||||
|
if (!_tracingModuleAvailable)
|
||||||
|
{
|
||||||
|
SkipReason += "The machine does not have IIS TracingModule installed.";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsMet { get; }
|
public bool IsMet { get; }
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,12 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using System.IO;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Server.IIS.FunctionalTests.Utilities;
|
using Microsoft.AspNetCore.Server.IIS.FunctionalTests.Utilities;
|
||||||
using Microsoft.AspNetCore.Server.IntegrationTesting;
|
using Microsoft.AspNetCore.Server.IntegrationTesting;
|
||||||
using Microsoft.AspNetCore.Server.IntegrationTesting.IIS;
|
using Microsoft.AspNetCore.Server.IntegrationTesting.IIS;
|
||||||
using Microsoft.AspNetCore.Testing.xunit;
|
using Microsoft.AspNetCore.Testing.xunit;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
using Xunit.Abstractions;
|
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue