未验证 提交 74c589f3 编写于 作者: M Mitchell Hwang 提交者: GitHub

[tests] Skip XslCompiledTransformApi tests on iOS, tvOS, and when testing native AOT (#75730)

* Skip XslCompiledTransformApi tests on iOS, tvOS, and when testing native AOT

* Condition each XslCompiledTransformApi test class on IsReflectionEmitSupported
Co-authored-by: NJan Kotas <jkotas@microsoft.com>
上级 7681692b
......@@ -13,6 +13,7 @@
namespace System.Xml.XslCompiledTransformApiTests
{
//[TestCase(Name = "Xml 4th Errata tests for XslCompiledTransform", Params = new object[] { 300 })]
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class Errata4 : XsltApiTestCaseBase2
{
private ITestOutputHelper _output;
......
......@@ -10,6 +10,7 @@
namespace System.Xml.XslCompiledTransformApiTests
{
//[TestCase(Name = "OutputSettings", Desc = "This testcase tests the OutputSettings on XslCompiledTransform", Param = "Debug")]
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class COutputSettings : XsltApiTestCaseBase2
{
private XslCompiledTransform _xsl = null;
......
......@@ -9,6 +9,7 @@
namespace System.Xml.XslCompiledTransformApiTests
{
//[TestCase(Name = "TemporaryFiles", Desc = "This testcase tests the Temporary Files property on XslCompiledTransform")]
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class TempFiles : XsltApiTestCaseBase2
{
private XslCompiledTransform _xsl = null;
......
......@@ -81,6 +81,7 @@ protected void WLoad(XslCompiledTransform instance, MethodInfo meth, byte[] byte
}
//[TestCase(Name = "Load(MethodInfo, ByteArray, TypeArray) tests", Desc = "This testcase tests private Load method via Reflection. This method is used by sharepoint")]
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CLoadMethInfoTest : ReflectionTestCaseBase
{
private ITestOutputHelper _output;
......@@ -476,6 +477,7 @@ public void Var14()
//[TestCase(Name = "XslCompiledTransform.XmlResolver : Navigator, Stream", Desc = "NAVIGATOR,STREAM")]
//[TestCase(Name = "XslCompiledTransform.XmlResolver : Navigator, Writer", Desc = "NAVIGATOR,WRITER")]
//[TestCase(Name = "XslCompiledTransform.XmlResolver : Navigator, TextWriter", Desc = "NAVIGATOR,TEXTWRITER")]
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CXmlResolverTest : XsltApiTestCaseBase2, IDisposable
{
private ITestOutputHelper _output;
......@@ -666,6 +668,7 @@ public void XmlResolver7(XslInputType xslInputType, ReaderType readerType, Outpu
//[TestCase(Name = "XslCompiledTransform.Load() - Integrity : Navigator, Stream", Desc = "NAVIGATOR,STREAM")]
//[TestCase(Name = "XslCompiledTransform.Load() - Integrity : Navigator, Writer", Desc = "NAVIGATOR,WRITER")]
//[TestCase(Name = "XslCompiledTransform.Load() - Integrity : Navigator, TextWriter", Desc = "NAVIGATOR,TEXTWRITER")]
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CLoadTest : XsltApiTestCaseBase2
{
private ITestOutputHelper _output;
......@@ -1004,6 +1007,7 @@ public void LoadGeneric12(XslInputType xslInputType, ReaderType readerType)
//[TestCase(Name = "XslCompiledTransform.Load(XmlResolver) - Integrity : URI, Stream", Desc = "URI,STREAM")]
//[TestCase(Name = "XslCompiledTransform.Load(XmlResolver) - Integrity : URI, Writer", Desc = "URI,WRITER")]
//[TestCase(Name = "XslCompiledTransform.Load(XmlResolver) - Integrity : URI, TextWriter", Desc = "URI,TEXTWRITER")]
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CLoadXmlResolverTest : XsltApiTestCaseBase2
{
private ITestOutputHelper _output;
......@@ -1435,6 +1439,7 @@ public void LoadGeneric11(XslInputType xslInputType, ReaderType readerType)
//[TestCase(Name = "XslCompiledTransform.Load(Url, Resolver) : URI, Stream", Desc = "URI,STREAM")]
//[TestCase(Name = "XslCompiledTransform.Load(Url, Resolver) : URI, Writer", Desc = "URI,WRITER")]
//[TestCase(Name = "XslCompiledTransform.Load(Url, Resolver) : URI, TextWriter", Desc = "URI,TEXTWRITER")]
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CLoadUrlResolverTest : XsltApiTestCaseBase2
{
private ITestOutputHelper _output;
......@@ -1534,6 +1539,7 @@ private sealed class XmlAuditingUrlResolver : XmlUrlResolver
/***********************************************************/
//[TestCase(Name = "XslCompiledTransform.Load(Url) Integrity : URI, Stream", Desc = "URI,STREAM")]
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CLoadStringTest : XsltApiTestCaseBase2
{
private ITestOutputHelper _output;
......@@ -1652,6 +1658,7 @@ public void LoadUrl5(ReaderType readerType)
/***********************************************************/
//[TestCase(Name = "XslCompiledTransform .Load(IXPathNavigable) : Navigator, TextWriter", Desc = "NAVIGATOR,TEXTWRITER")]
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CLoadXPathNavigableTest : XsltApiTestCaseBase2
{
private ITestOutputHelper _output;
......@@ -1760,6 +1767,7 @@ public void LoadNavigator4()
/***********************************************************/
//[TestCase(Name = "XslCompiledTransform.Load(Reader) : Reader, Stream", Desc = "READER,STREAM")]
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CLoadReaderTest : XsltApiTestCaseBase2
{
private ITestOutputHelper _output;
......@@ -2149,6 +2157,7 @@ public override string Value
//[TestCase(Name = "XslCompiledTransform.Transform() Integrity : Navigator, Stream", Desc = "NAVIGATOR,STREAM")]
//[TestCase(Name = "XslCompiledTransform.Transform() Integrity : Navigator, Writer", Desc = "NAVIGATOR,WRITER")]
//[TestCase(Name = "XslCompiledTransform.Transform() Integrity : Navigator, TextWriter", Desc = "NAVIGATOR,TEXTWRITER")]
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CTransformTestGeneric : XsltApiTestCaseBase2
{
private ITestOutputHelper _output;
......@@ -2404,6 +2413,7 @@ public void TransformGeneric11(XslInputType xslInputType, ReaderType readerType,
//[TestCase(Name = "XslCompiledTransform.Transform(XmlResolver) : Navigator, Stream", Desc = "NAVIGATOR,STREAM")]
//[TestCase(Name = "XslCompiledTransform.Transform(XmlResolver) : Navigator, Writer", Desc = "NAVIGATOR,WRITER")]
//[TestCase(Name = "XslCompiledTransform.Transform(XmlResolver) : Navigator, TextWriter", Desc = "NAVIGATOR,TEXTWRITER")]
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CTransformResolverTest : XsltApiTestCaseBase2, IDisposable
{
private ITestOutputHelper _output;
......@@ -2615,6 +2625,7 @@ public void XmlResolver7(XslInputType xslInputType, ReaderType readerType, Outpu
//[TestCase(Name = "XslCompiledTransform.Transform(String, String) : Reader , String", Desc = "READER,STREAM")]
//[TestCase(Name = "XslCompiledTransform.Transform(String, String) : URI, String", Desc = "URI,STREAM")]
//[TestCase(Name = "XslCompiledTransform.Transform(String, String) : Navigator, String", Desc = "NAVIGATOR,STREAM")]
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CTransformStrStrTest : XsltApiTestCaseBase2
{
private ITestOutputHelper _output;
......@@ -2987,6 +2998,7 @@ public void TransformStrStr13(XslInputType xslInputType, ReaderType readerType)
//[TestCase(Name = "XslCompiledTransform.Transform(String, String, Resolver) : Reader , String", Desc = "READER,STREAM")]
//[TestCase(Name = "XslCompiledTransform.Transform(String, String, Resolver) : URI, String", Desc = "URI,STREAM")]
//[TestCase(Name = "XslCompiledTransform.Transform(String, String, Resolver) : Navigator, String", Desc = "NAVIGATOR,STREAM")]
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CTransformStrStrResolverTest : XsltApiTestCaseBase2, IDisposable
{
private ITestOutputHelper _output;
......@@ -3091,6 +3103,7 @@ public void TransformStrStrResolver3(object param, XslInputType xslInputType, Re
//[TestCase(Name = "XslCompiledTransform.Transform(IXPathNavigable, XsltArgumentList, XmlWriter, XmlResolver)", Desc = "Constructor Tests", Param = "IXPathNavigable")]
//[TestCase(Name = "XslCompiledTransform.Transform(XmlReader, XsltArgumentList, XmlWriter, XmlResolver)", Desc = "Constructor Tests", Param = "XmlReader")]
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CTransformConstructorWithFourParametersTest : XsltApiTestCaseBase2
{
private ITestOutputHelper _output;
......@@ -3295,6 +3308,7 @@ public void InValidCases(object param0, object param1, object param2)
// This testcase is for bugs 109429, 111075 and 109644 fixed in Everett SP1
//[TestCase(Name = "NDP1_1SP1 Bugs (URI,STREAM)", Desc = "URI,STREAM")]
//[TestCase(Name = "NDP1_1SP1 Bugs (NAVIGATOR,TEXTWRITER)", Desc = "NAVIGATOR,TEXTWRITER")]
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CNDP1_1SP1Test : XsltApiTestCaseBase2
{
private ITestOutputHelper _output;
......@@ -3386,6 +3400,7 @@ public void var4(XslInputType xslInputType, ReaderType readerType, OutputType ou
}
//[TestCase(Name = "XslCompiledTransform Regression Tests for API", Desc = "XslCompiledTransform Regression Tests")]
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CTransformRegressionTest : XsltApiTestCaseBase2, IDisposable
{
private ITestOutputHelper _output;
......
......@@ -7,6 +7,7 @@
namespace System.Xml.XslCompiledTransformApiTests
{
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class XslCompilerTests
{
[Fact]
......
......@@ -35,6 +35,7 @@ public new void Init(object objParam)
}
//[TestCase(Name = "Same instance testing: Transform() - READER")]
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class SameInstanceXslTransformReader : SameInstanceXslTransformTestCase
{
private XPathDocument _xd; // Loads XML file
......@@ -318,6 +319,7 @@ public void proc12()
}
//[TestCase(Name = "Same instance testing: Transform() - TEXTWRITER")]
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class SameInstanceXslTransformWriter : SameInstanceXslTransformTestCase
{
private XPathDocument _xd; // Loads XML file
......
......@@ -37,6 +37,7 @@ public enum NavType
// Base class for test cases
//
////////////////////////////////////////////////////////////////
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class XsltApiTestCaseBase2
{
// Generic data for all derived test cases
......
......@@ -17,6 +17,7 @@ namespace System.Xml.XslCompiledTransformApiTests
/***********************************************************/
//[TestCase(Name = "XsltArgumentList - GetParam", Desc = "Get Param Test Cases")]
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CArgIntegrity : XsltApiTestCaseBase2
{
private ITestOutputHelper _output;
......
......@@ -55,6 +55,7 @@ public new void Init(object objParam)
}
//[TestCase(Name = "Same instance testing: XsltArgList - GetParam", Desc = "GetParam test cases")]
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CSameInstanceXsltArgumentListGetParam : CSameInstanceXsltArgTestCase2
{
private ITestOutputHelper _output;
......@@ -140,6 +141,7 @@ public void proc2()
}
//[TestCase(Name = "Same instance testing: XsltArgList - GetExtensionObject", Desc = "GetExtensionObject test cases")]
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CSameInstanceXsltArgumentListGetExtnObject : CSameInstanceXsltArgTestCase2
{
private ITestOutputHelper _output;
......@@ -224,6 +226,7 @@ public void proc2()
}
//[TestCase(Name = "Same instance testing: XsltArgList - Transform", Desc = "Multiple transforms")]
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CSameInstanceXsltArgumentListTransform : CSameInstanceXsltArgTestCase2
{
private ITestOutputHelper _output;
......
......@@ -13,6 +13,7 @@ namespace System.Xml.XslCompiledTransformApiTests
{
//[TestCase(Name = "XsltSettings-Retail", Desc = "This testcase tests the different settings on XsltSettings and the corresponding behavior in retail mode", Param = "Retail")]
//[TestCase(Name = "XsltSettings-Debug", Desc = "This testcase tests the different settings on XsltSettings and the corresponding behavior in debug mode", Param = "Debug")]
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
public class CXsltSettings : XsltApiTestCaseBase2
{
private ITestOutputHelper _output;
......
......@@ -245,9 +245,6 @@
<ItemGroup Condition="'$(TargetOS)' == 'iOS' and '$(RunDisablediOSTests)' != 'true'">
<ProjectExclusions Include="$(MSBuildThisFileDirectory)*\tests\**\*.Tests.csproj" />
<!-- Ref.Emit in XSLCompiledTransform -->
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Private.Xml\tests\Xslt\XslCompiledTransformApi\System.Xml.Xsl.XslCompiledTransformApi.Tests.csproj" />
<!-- Functional tests on devices have problems with return codes from mlaunch -->
<ProjectExclusions Include="$(RepoRoot)\src\tests\FunctionalTests\$(TargetOS)\Device\**\*.Test.csproj" />
</ItemGroup>
......@@ -258,8 +255,6 @@
</ItemGroup>
<ItemGroup Condition="'$(TargetOS)' == 'tvOS' and '$(RunDisablediOSTests)' != 'true'">
<!-- Ref.Emit in XSLCompiledTransform -->
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Private.Xml\tests\Xslt\XslCompiledTransformApi\System.Xml.Xsl.XslCompiledTransformApi.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Reflection\tests\System.Reflection.Emit.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Reflection.Emit.ILGeneration/tests/System.Reflection.Emit.ILGeneration.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Reflection.Emit.Lightweight/tests/System.Reflection.Emit.Lightweight.Tests.csproj" />
......@@ -494,9 +489,6 @@
<!-- More than two thirds of tests failing due to ref emit -->
<ProjectExclusions Include="$(MSBuildThisFileDirectory)Microsoft.Extensions.DependencyInjection\tests\DI.Tests\Microsoft.Extensions.DependencyInjection.Tests.csproj" />
<!-- Xslt is ref.emit -->
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Private.Xml\tests\Xslt\XslCompiledTransformApi\System.Xml.Xsl.XslCompiledTransformApi.Tests.csproj" />
<!-- These are failing in localized runs due to satellite assembly reflection in the test. Work fine otherwise. -->
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Private.Xml\tests\XmlSchema\XmlSchemaValidatorApi\System.Xml.XmlSchema.XmlSchemaValidatorApi.Tests.csproj"
Condition="'$(TargetOS)' == 'windows'"/>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册