Skip to content

Comments

Enable Adding Disabled Tests Skip Reason to their XML Results Log From issues.targets#93492

Merged
ivdiazsa merged 7 commits intodotnet:mainfrom
ivdiazsa:the-tests-letters
Oct 17, 2023
Merged

Enable Adding Disabled Tests Skip Reason to their XML Results Log From issues.targets#93492
ivdiazsa merged 7 commits intodotnet:mainfrom
ivdiazsa:the-tests-letters

Conversation

@ivdiazsa
Copy link
Contributor

@ivdiazsa ivdiazsa commented Oct 13, 2023

Feature that fixes issue #91562. This PR adds the necessary functionality to write the reason any given test was skipped in their results xml file.

Currently, it is hard-coded to the message "No Known Skip Reason". With this PR, the reason will be taken from the test's disable explanation in src/tests/issues.targets, in their respective <Issue> tag. If there is no such message, then we will default to today's message of "No Known Skip Reason".

A good amount of code cleanup was done as part of this PR as well. Due to how Github handles file differences and spacing, especially with long lines, I highly recommend using the Unified view instead of the Split one for reviewing this one PR.

@ghost
Copy link

ghost commented Oct 13, 2023

Tagging subscribers to this area: @hoyosjs
See info in area-owners.md if you want to be subscribed.

Issue Details

Feature that fixes issue #91562. This PR adds the necessary functionality to write the reason any given test was skipped in their results xml file.

Currently, it is hard-coded to the message "No Known Skip Reason". With this PR, the reason will be taken from the test's disable explanation in src/tests/issues.targets, in their respective <Issue> tag. If there is no such message, then we will default to today's message of "No Known Skip Reason".

Author: ivdiazsa
Assignees: -
Labels:

area-Infrastructure-coreclr

Milestone: 9.0.0

@ghost ghost assigned ivdiazsa Oct 13, 2023
@ivdiazsa ivdiazsa changed the title The tests letters Enable Adding Disabled Tests Skip Reason to their XML Results Log From issues.targets Oct 13, 2023
@ivdiazsa
Copy link
Contributor Author

/azp run runtime-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@trylek trylek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM in general, I believe it's good to go it if works in the lab.

@ivdiazsa
Copy link
Contributor Author

ivdiazsa commented Oct 13, 2023

Ok there's a bug with certain cases where we have no specified reason for skipping a test. Will get to work on a fix for it.

hash = hash * 23 + (Method?.GetHashCode() ?? 0);
hash = hash * 23 + (ContainingType?.GetHashCode() ?? 0);
hash = hash * 23 + (ExecutionStatement?.GetHashCode() ?? 0);
hash = hash * 23 + (_executionStatement?.GetHashCode() ?? 0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use HashCode.Combine ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is in a source generator which targets .NET Standard 2.0.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, you'd have to have a package reference to the OOB. probably not worth it I guess.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Referencing OOB dependencies for Roslyn components is very annoying to get right. I’d recommend against it unless necessary tbh.

public static Dictionary<string, string> LoadTestExclusionTable()
{
HashSet<string> output = new ();
Dictionary<string, string> output = new Dictionary<string, string>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explicit comparer?

@ivdiazsa
Copy link
Contributor Author

/azp run runtime-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ivdiazsa
Copy link
Contributor Author

/azp run runtime-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ivdiazsa
Copy link
Contributor Author

Failures are unrelated so merging this feature now.

@ghost ghost locked as resolved and limited conversation to collaborators Nov 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

Development

Successfully merging this pull request may close these issues.

CoreCLR test infra: improve "Skip" messages for tests blocked in issues.targets

4 participants