-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[wasm][tests] Fix test failures due to trimming #51697
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
acba56d
Enable all the tests with trimming issues
radical 62e7c7a
[wasm] Disable tests that fail to build with trimming
radical 1e1a74c
[wasm] Disable System.Linq.Expressions.Tests due to trimming errors
radical f285564
[wasm] Fix build errors due to trimming in System.Reflection.Metadata…
radical 7f65c2b
[wasm] fix build error for System.Reflection.Tests
radical 539048c
Merge remote-tracking branch 'origin/main' into test-trimming-for-aot
radical 5bffdba
[wasm] Fix trimming errors for System.Runtime tests
radical 10506d8
[wasm] Disable test failing with trimming - System.Reflection.Metadat…
radical d8451af
[wasm] Disable System.Runtime.InteropServices.Tests due to trimming
radical 49c7e5a
[wasm] Fix trimming errors for Microsoft.Extensions.Logging.Tests
radical 7e653a0
Disable tests for https://github.com/dotnet/runtime/issues/51211
radical 1374c91
[wasm] Disable more tests failing with trimming
radical 390e4e9
[wasm] Disable individual tests failing with trimming
radical 362608f
[wasm] Fix trimming errors for System.Runtime.Extensions.Tests
radical 12cf86b
[wasm] Fix System.Reflection.Tests failing due to trimming
radical 7d31a83
Merge remote-tracking branch 'origin/main' into test-trimming-for-aot
radical 59bb6c6
[wasm] Fix trimming errors for System.Runtime.Serialization.Json.Tests
radical 62df596
[wasm] Fix trimming errors in System.Xml.RW.* tests
radical 12cdcbd
[wasm] Fix trimming errors for System.Runtime.Caching.Tests
radical dcce073
[wasm] Fix trimming errors for System.Tests.ActivatorTests
radical a92333e
[wasm] Fix trimming errors for Microsoft.Extensions.Logging.Test.Trac…
radical f3b0d74
[wasm][eat] Disable failing test System.Data.Tests.XmlDataReaderTest.…
radical e89323c
[wasm] Fix trimming errors for System.Reflection.Tests
radical e09cad4
[wasm] Fix trimming errors for System.Reflection.Tests
radical 2b10631
[wasm] Fix trimming errors in System.Reflection.Tests
radical 189a79d
[wasm[eat] Fix test failures due to missing type
radical 437d614
[wasm][eat] Fix System.Text.Json.Tests.DebuggerTests caused by trimming
radical b0274a4
[wasm] Fix test failing due to trimming
radical f579f8b
[wasm][eat] Disable System.Text.Json tests failing due to trimming
radical 999426f
Disable test failing due to trimming in System.Reflection.Tests
radical 3a91a5d
Disable tests failing due to trimming in System.Runtime.Loader
radical 6d44922
Use linker substitutions to set PlatformDetection.IsBuiltWithAggressi…
radical d3e215a
Use TestUtilities substitutions only if AggressiveTrimming is enabled
radical 1ac21c3
Address review feedback - rename ILDescriptorsPath
radical b9bf835
Address review feedback, move CoreCLR linker file next to the project
radical 0aee262
Address review feedback - move ModuleCore.xml closer to it's use
radical bf123ca
Address review feedback - Move root assembly references to descriptor…
radical 6ecbceb
Fix ILLinkDescriptorsPath
radical 3dc25ee
[wasm] Disable some System.Text.Json tests
radical 812f860
[wasm] Disable failing test in System.Xml.Xsl.XslCompiledTransformApi…
radical 2d666e6
Preserve xunit type in tests
radical 620c5bb
[wasm] Disable failing tests in System.Xml.Xsl.XslCompiledTransformAp…
radical c57520d
[wasm] Disable failing tests in `System.Runtime.Tests`
radical 91fca65
Merge remote-tracking branch 'origin/main' into test-trimming-for-aot
radical 5507316
Merge remote-tracking branch 'origin/main' into test-trimming-for-aot
radical b694c10
Update list of disabled tests, and disable aot ones only when relevant
radical d792ac7
Fix build: don't run aot for tests that fail with eat
radical 6b8cada
Disable failing test `DataContractSerializerTests.DCS_DerivedTypeWith…
radical 8a912e6
Disable System.Reflection.Metadata.Decoding.Tests.CustomAttributeDeco…
radical 0a770d0
Disable System.Reflection.Tests.CustomAttributeTests.CustomAttributeT…
radical c004584
Disable System.Runtime.Extensions.Tests for aot
radical ee78cd7
Disable System.Runtime.Tests, and System.Text.Json.Tests for aot
radical a644852
Fix path for System.Text.Json tests
radical File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[wasm] Fix trimming errors for Microsoft.Extensions.Logging.Tests
.. and: - Microsoft.Extensions.Configuration.FileExtensions - Microsoft.Extensions.Configuration - Microsoft.Extensions.FileProviders.Composite - Microsoft.Extensions.Logging - Microsoft.Extensions.Primitives - Microsoft.Extensions.Http.Tests Fixes #50709 Example failures: ``` [02:19:11] fail: [FAIL] Microsoft.Extensions.Logging.Test.LoggerFactoryTest.CreateDisposeDisposesInnerServiceProvider [02:19:11] info: System.ArgumentException : Type Moq.Internals.InterfaceProxy is not valid base type for interface proxy, because it does not have accessible parameterless constructor. Only a non-sealed class with non-private default constructor can be used as base type for interface proxy. Please use some other valid type. [02:19:11] info: at Castle.DynamicProxy.Generators.InterfaceProxyWithTargetGenerator.ThrowInvalidBaseType(Type type, String doesNotHaveAccessibleParameterlessConstructor) [02:19:11] info: at Castle.DynamicProxy.Generators.InterfaceProxyWithTargetGenerator.EnsureValidBaseType(Type type) [02:19:11] info: at Castle.DynamicProxy.Generators.InterfaceProxyWithTargetGenerator.GenerateCode(Type proxyTargetType, Type[] interfaces, ProxyGenerationOptions options) [02:19:11] info: at Castle.DynamicProxy.DefaultProxyBuilder.CreateInterfaceProxyTypeWithoutTarget(Type interfaceToProxy, Type[] additionalInterfacesToProxy, ProxyGenerationOptions options) [02:19:11] info: at Castle.DynamicProxy.ProxyGenerator.CreateInterfaceProxyTypeWithoutTarget(Type interfaceToProxy, Type[] additionalInterfacesToProxy, ProxyGenerationOptions options) [02:19:11] info: at Castle.DynamicProxy.ProxyGenerator.CreateInterfaceProxyWithoutTarget(Type interfaceToProxy, Type[] additionalInterfacesToProxy, ProxyGenerationOptions options, IInterceptor[] interceptors) [02:19:11] info: at Moq.CastleProxyFactory.CreateProxy(Type mockType, IInterceptor interceptor, Type[] interfaces, Object[] arguments) [02:19:11] info: at Moq.Mock`1[[Microsoft.Extensions.Logging.ILoggerProvider, Microsoft.Extensions.Logging.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].InitializeInstance() [02:19:11] info: at Moq.Mock`1[[Microsoft.Extensions.Logging.ILoggerProvider, Microsoft.Extensions.Logging.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].OnGetObject() [02:19:11] info: at Moq.Mock.get_Object() [02:19:11] info: at Moq.Mock`1[[Microsoft.Extensions.Logging.ILoggerProvider, Microsoft.Extensions.Logging.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].get_Object() [02:19:11] info: at Microsoft.Extensions.Logging.Test.LoggerFactoryTest.<>c__DisplayClass20_0.<CreateDisposeDisposesInnerServiceProvider>b__3(IServiceProvider _) [02:19:11] info: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, RuntimeResolverContext context) [02:19:11] info: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2[[Microsoft.Extensions.DependencyInjection.ServiceLookup.RuntimeResolverContext, Microsoft.Extensions.DependencyInjection, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60],[System.Object, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].VisitCallSiteMain(ServiceCallSite callSite, RuntimeResolverContext argument) [02:19:11] info: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.ResolveService(ServiceCallSite callSite, RuntimeResolverContext context, RuntimeResolverLock lockType, ServiceProviderEngineScope serviceProviderEngine) [02:19:11] info: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) [02:19:11] info: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2[[Microsoft.Extensions.DependencyInjection.ServiceLookup.RuntimeResolverContext, Microsoft.Extensions.DependencyInjection, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60],[System.Object, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].VisitCallSite(ServiceCallSite callSite, RuntimeResolverContext argument) [02:19:11] info: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitIEnumerable(IEnumerableCallSite enumerableCallSite, RuntimeResolverContext context) [02:19:11] info: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2[[Microsoft.Extensions.DependencyInjection.ServiceLookup.RuntimeResolverContext, Microsoft.Extensions.DependencyInjection, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60],[System.Object, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].VisitCallSiteMain(ServiceCallSite callSite, RuntimeResolverContext argument) [02:19:11] info: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.ResolveService(ServiceCallSite callSite, RuntimeResolverContext context, RuntimeResolverLock lockType, ServiceProviderEngineScope serviceProviderEngine) [02:19:11] info: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) [02:19:12] info: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2[[Microsoft.Extensions.DependencyInjection.ServiceLookup.RuntimeResolverContext, Microsoft.Extensions.DependencyInjection, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60],[System.Object, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].VisitCallSite(ServiceCallSite callSite, RuntimeResolverContext argument) [02:19:12] info: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context) [02:19:12] info: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2[[Microsoft.Extensions.DependencyInjection.ServiceLookup.RuntimeResolverContext, Microsoft.Extensions.Depende ncyInjection, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60],[System.Object, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].VisitCallSiteMain(S erviceCallSite callSite, RuntimeResolverContext argument) [02:19:12] info: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.ResolveService(ServiceCallSite callSite, RuntimeResolverContext context, RuntimeResolverLock lockType, ServiceProviderEngineScope serviceProviderEngine) [02:19:12] info: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) [02:19:12] info: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2[[Microsoft.Extensions.DependencyInjection.ServiceLookup.RuntimeResolverContext, Microsoft.Extensions.Depende ncyInjection, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60],[System.Object, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].VisitCallSite(Servi ceCallSite callSite, RuntimeResolverContext argument) [02:19:12] info: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope) [02:19:12] info: at Microsoft.Extensions.DependencyInjection.ServiceLookup.RuntimeServiceProviderEngine.<>c__DisplayClass1_0.<RealizeService>b__1(ServiceProviderEngineScope p) [02:19:12] info: at Microsoft.Extensions.DependencyInjection.ServiceLookup.RuntimeServiceProviderEngine.<>c__DisplayClass1_0.<RealizeService>b__0(ServiceProviderEngineScope scope) [02:19:12] info: at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope) [02:19:12] info: at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType) [02:19:12] info: at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType) [02:19:12] info: at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[ILoggerFactory](IServiceProvider provider) [02:19:12] info: at Microsoft.Extensions.Logging.LoggerFactory.Create(Action`1 configure) [02:19:12] info: at Microsoft.Extensions.Logging.Test.LoggerFactoryTest.CreateDisposeDisposesInnerServiceProvider() [02:19:12] info: at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) ```
- Loading branch information
commit 49c7e5a0e251ff2c018b955891428271bd2ae1e5
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to detect if the test has a reference to
Moq, and add this automatically if it does? That way this doesn't need to be copied everywhere.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could look for
Moqin@(PackageReference). I tried to find all the references toMoq, and*Castle.xml:.. and there seem to be some projects that either don't need the linker xml, or maybe I didn't get to failing test because of
Moqyet.Should we add that irrespective? or maybe doing it as-needed per project is better?