Skip to content
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

ConvertToGeneratedDllImportFixerTests.PreferredAttributeOrder failed in CI #60934

Closed
eerhardt opened this issue Oct 27, 2021 · 4 comments · Fixed by #60940
Closed

ConvertToGeneratedDllImportFixerTests.PreferredAttributeOrder failed in CI #60934

eerhardt opened this issue Oct 27, 2021 · 4 comments · Fixed by #60940

Comments

@eerhardt
Copy link
Member

https://dev.azure.com/dnceng/public/_build/results?buildId=1442108&view=logs&jobId=4724cd84-0a26-56bc-9b1d-ca1983f340b0

Test DllImportGenerator.UnitTests.ConvertToGeneratedDllImportFixerTests.PreferredAttributeOrder has failed. Check the Test tab or this console log: https://helix.dot.net/api/2019-06-17/jobs/3e2d5fb0-c474-4dff-8b8d-61c7e8241ca3/workitems/DllImportGenerator.Unit.Tests/console

DllImportGenerator.UnitTests.ConvertToGeneratedDllImportFixerTests.RemoveableNamedArguments(usePreprocessorDefines: False) [SKIP]
      Skipping test due to issue with test-packages (The package is missing the required nuspec file. Path: /var/folders/3z/h5nxtjjj6lg28plvh_twzfs80000gq/T/test-packages/Microsoft.NETCore.App.Ref.6.0.0-preview.6.21352.12). See https://github.com/dotnet/roslyn-sdk/issues/590.
    DllImportGenerator.UnitTests.ConvertToGeneratedDllImportFixerTests.PreferredAttributeOrder(usePreprocessorDefines: True) [FAIL]
      Microsoft.DotNet.XUnitExtensions.SkipTestException : Skipping test due to issue with test-packages (The package is missing the required nuspec file. Path: /var/folders/3z/h5nxtjjj6lg28plvh_twzfs80000gq/T/test-packages/Microsoft.NETCore.App.Ref.6.0.0-preview.6.21352.12). See https://github.com/dotnet/roslyn-sdk/issues/590.
      Stack Trace:
        /_/src/libraries/System.Runtime.InteropServices/tests/DllImportGenerator.UnitTests/TestUtils.cs(170,0): at DllImportGenerator.UnitTests.TestUtils.ThrowSkipExceptionIfPackagingException(Exception e)
        /_/src/libraries/System.Runtime.InteropServices/tests/DllImportGenerator.UnitTests/Verifiers/CSharpCodeFixVerifier.cs(128,0): at DllImportGenerator.UnitTests.Verifiers.CSharpCodeFixVerifier`2.Test.RunImplAsync(CancellationToken cancellationToken)
        /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs(180,0): at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.RunAsync(CancellationToken cancellationToken)
        /_/src/libraries/System.Runtime.InteropServices/tests/DllImportGenerator.UnitTests/Verifiers/CSharpCodeFixVerifier.cs(67,0): at DllImportGenerator.UnitTests.Verifiers.CSharpCodeFixVerifier`2.VerifyCodeFixAsync(String source, DiagnosticResult[] expected, String fixedSource, String codeActionEquivalenceKey)
        /_/src/libraries/System.Runtime.InteropServices/tests/DllImportGenerator.UnitTests/Verifiers/CSharpCodeFixVerifier.cs(49,0): at DllImportGenerator.UnitTests.Verifiers.CSharpCodeFixVerifier`2.VerifyCodeFixAsync(String source, String fixedSource, String codeActionEquivalenceKey)
        /_/src/libraries/System.Runtime.InteropServices/tests/DllImportGenerator.UnitTests/ConvertToGeneratedDllImportFixerTests.cs(403,0): at DllImportGenerator.UnitTests.ConvertToGeneratedDllImportFixerTests.PreferredAttributeOrder(Boolean usePreprocessorDefines)
        --- End of stack trace from previous location ---
    DllImportGenerator.UnitTests.ConvertToGeneratedDllImportFixerTests.PreferredAttributeOrder(usePreprocessorDefines: False) [FAIL]
      Microsoft.DotNet.XUnitExtensions.SkipTestException : Skipping test due to issue with test-packages (The package is missing the required nuspec file. Path: /var/folders/3z/h5nxtjjj6lg28plvh_twzfs80000gq/T/test-packages/Microsoft.NETCore.App.Ref.6.0.0-preview.6.21352.12). See https://github.com/dotnet/roslyn-sdk/issues/590.
      Stack Trace:
        /_/src/libraries/System.Runtime.InteropServices/tests/DllImportGenerator.UnitTests/TestUtils.cs(170,0): at DllImportGenerator.UnitTests.TestUtils.ThrowSkipExceptionIfPackagingException(Exception e)
        /_/src/libraries/System.Runtime.InteropServices/tests/DllImportGenerator.UnitTests/Verifiers/CSharpCodeFixVerifier.cs(128,0): at DllImportGenerator.UnitTests.Verifiers.CSharpCodeFixVerifier`2.Test.RunImplAsync(CancellationToken cancellationToken)
        /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs(180,0): at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.RunAsync(CancellationToken cancellationToken)
        /_/src/libraries/System.Runtime.InteropServices/tests/DllImportGenerator.UnitTests/Verifiers/CSharpCodeFixVerifier.cs(67,0): at DllImportGenerator.UnitTests.Verifiers.CSharpCodeFixVerifier`2.VerifyCodeFixAsync(String source, DiagnosticResult[] expected, String fixedSource, String codeActionEquivalenceKey)
        /_/src/libraries/System.Runtime.InteropServices/tests/DllImportGenerator.UnitTests/Verifiers/CSharpCodeFixVerifier.cs(49,0): at DllImportGenerator.UnitTests.Verifiers.CSharpCodeFixVerifier`2.VerifyCodeFixAsync(String source, String fixedSource, String codeActionEquivalenceKey)
        /_/src/libraries/System.Runtime.InteropServices/tests/DllImportGenerator.UnitTests/ConvertToGeneratedDllImportFixerTests.cs(403,0): at DllImportGenerator.UnitTests.ConvertToGeneratedDllImportFixerTests.PreferredAttributeOrder(Boolean usePreprocessorDefines)
        --- End of stack trace from previous location ---
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Oct 27, 2021
@jkoritzinsky
Copy link
Member

cc @elinor-fung looks like the idea to skip tests with the exception isn’t working quite right.

@safern whats the best way to conditionally skip a test in an imperative fashion (ie determining during a test to skip)

@safern
Copy link
Member

safern commented Oct 27, 2021

You make it a conditional fact or conditional theory without any condition and then at runtime you throw a SkipTestException.

I.e:

throw new SkipTestException($"Didn't find DebuggerTypeProxyAttribute on {eo}.");

@elinor-fung
Copy link
Member

Ergh... This was just me failing at resolving merge conflicts, such that that one test ended Theory instead of ConditionalTheory.

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Oct 27, 2021
@eerhardt eerhardt removed the untriaged New issue has not been triaged by the area owner label Oct 27, 2021
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Oct 28, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Nov 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants