diff options
author | Vitek Karas <vitek.karas@microsoft.com> | 2020-04-02 18:21:46 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-02 18:21:46 +0300 |
commit | 3135a7354a96a7bd2f4a882ad65e0407abff51be (patch) | |
tree | bebfde0139ce6b2f996b03ccbad4f5082ae93ad7 /test/Mono.Linker.Tests | |
parent | ec2cbdb894e11065f42b1223f664d9688b749323 (diff) |
Add ability to turn of validation of the Kept attributes (#1036)
* Add ability to turn of validation of the Kept attributes
It disables the entire AssemblyChecker, but I wanted an attribute name which is not tied to the implementation details. And currently the AssemblyChecker really only validates the Kept attributes.
* PR feedback - rename and make the attribute per-class
Diffstat (limited to 'test/Mono.Linker.Tests')
-rw-r--r-- | test/Mono.Linker.Tests/TestCasesRunner/ResultChecker.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/Mono.Linker.Tests/TestCasesRunner/ResultChecker.cs b/test/Mono.Linker.Tests/TestCasesRunner/ResultChecker.cs index 3752c8b94..8660a0807 100644 --- a/test/Mono.Linker.Tests/TestCasesRunner/ResultChecker.cs +++ b/test/Mono.Linker.Tests/TestCasesRunner/ResultChecker.cs @@ -57,7 +57,10 @@ namespace Mono.Linker.Tests.TestCasesRunner { PerformOutputAssemblyChecks (original, linkResult.OutputAssemblyPath.Parent); PerformOutputSymbolChecks (original, linkResult.OutputAssemblyPath.Parent); - CreateAssemblyChecker (original, linked).Verify (); + if (!original.MainModule.GetType (linkResult.TestCase.ReconstructedFullTypeName).CustomAttributes + .Any (attr => attr.AttributeType.Name == nameof (SkipKeptItemsValidationAttribute))) { + CreateAssemblyChecker (original, linked).Verify (); + } VerifyLinkingOfOtherAssemblies (original); |