Conditionally enable/disable targeting pack tests (#20255)
This commit is contained in:
parent
e3c705dbc2
commit
306ef044cf
|
|
@ -36,6 +36,10 @@
|
|||
<_Parameter1>TargetingPackLayoutRoot</_Parameter1>
|
||||
<_Parameter2>$(TargetingPackLayoutRoot)</_Parameter2>
|
||||
</AssemblyAttribute>
|
||||
<AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
|
||||
<_Parameter1>IsTargetingPackBuilding</_Parameter1>
|
||||
<_Parameter2>$(IsTargetingPackBuilding)</_Parameter2>
|
||||
</AssemblyAttribute>
|
||||
<AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
|
||||
<_Parameter1>VerifyAncmBinary</_Parameter1>
|
||||
<_Parameter2>$(VerifyAncmBinary)</_Parameter2>
|
||||
|
|
|
|||
|
|
@ -20,17 +20,24 @@ namespace Microsoft.AspNetCore
|
|||
private readonly string _expectedRid;
|
||||
private readonly string _targetingPackRoot;
|
||||
private readonly ITestOutputHelper _output;
|
||||
private readonly bool _isTargetingPackBuilding;
|
||||
|
||||
public TargetingPackTests(ITestOutputHelper output)
|
||||
{
|
||||
_output = output;
|
||||
_expectedRid = TestData.GetSharedFxRuntimeIdentifier();
|
||||
_targetingPackRoot = Path.Combine(TestData.GetTestDataValue("TargetingPackLayoutRoot"), "packs", "Microsoft.AspNetCore.App.Ref", TestData.GetTestDataValue("TargetingPackVersion"));
|
||||
_isTargetingPackBuilding = bool.Parse(TestData.GetTestDataValue("IsTargetingPackBuilding"));
|
||||
}
|
||||
|
||||
[Fact(Skip="https://github.com/aspnet/AspNetCore/issues/14832")]
|
||||
[Fact]
|
||||
public void AssembliesAreReferenceAssemblies()
|
||||
{
|
||||
if (!_isTargetingPackBuilding)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
IEnumerable<string> dlls = Directory.GetFiles(_targetingPackRoot, "*.dll", SearchOption.AllDirectories);
|
||||
Assert.NotEmpty(dlls);
|
||||
|
||||
|
|
@ -55,9 +62,14 @@ namespace Microsoft.AspNetCore
|
|||
});
|
||||
}
|
||||
|
||||
[Fact(Skip="https://github.com/aspnet/AspNetCore/issues/14832")]
|
||||
[Fact]
|
||||
public void PlatformManifestListsAllFiles()
|
||||
{
|
||||
if (!_isTargetingPackBuilding)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var platformManifestPath = Path.Combine(_targetingPackRoot, "data", "PlatformManifest.txt");
|
||||
var expectedAssemblies = TestData.GetSharedFxDependencies()
|
||||
.Split(';', StringSplitOptions.RemoveEmptyEntries)
|
||||
|
|
|
|||
Loading…
Reference in New Issue