Skip to content

Activate Disabled Tests #3870

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 1 commit into from
Nov 16, 2021
Merged

Activate Disabled Tests #3870

merged 1 commit into from
Nov 16, 2021

Conversation

SDGGiesbrecht
Copy link
Contributor

Spun out of #3838.

Either these tests were only mistakenly disabled behind ENABLE_TARGET_BASED_DEPENDENCY_RESOLUTION in the first place, or else the reason for their disabling has since evaporated.

The PIF tests had gone stale and missed some some identifier and setting updates, so those have been repaired.

(I did also update one identifier that is still behind a disabling condition. Otherwise it would have been the only stale PIF identifier left, and it seemed like it belonged together with all the PIF identifiers.)

@neonichu
Copy link
Contributor

I may have disabled them because they relied on test-only dependencies working which was originally behind ENABLE_TARGET_BASED_DEPENDENCY_RESOLUTION but was then restored to happen regardless of that.

@tomerd
Copy link
Contributor

tomerd commented Nov 15, 2021

@swift-ci please smoke test

} else {
return nil
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure about this mutating subscript. why does it need to mutate?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The subscript simply follows the pattern of the others around it, filling the hole for this particular signature:

  • Existing: subscript(_ key: SingleValueSetting) -> String?
  • Added because missing: subscript(_ key: SingleValueSetting, for platform: Platform) -> String?
  • Existing: subscript(_ key: MultipleValueSetting) -> [String]?
  • Existing: subscript(_ key: MultipleValueSetting, for platform: Platform) -> [String]?

The tests that call these subscripts appear to expect each call to clear the respective entry. After all expected settings have been checked (removing them as a side effect), the tests then check that the remainder is indeed empty. Left over entries (due to the list having gone stale) were why the test had been failing. Some of the entries I needed to add had this signature, which was not yet supported by the existing subscripts.

Copy link
Contributor

@tomerd tomerd left a comment

Choose a reason for hiding this comment

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

looks okay, but I am wondering why we need a mutating subscript, seems pretty unexpected behavior

@tomerd tomerd merged commit 44aff27 into swiftlang:main Nov 16, 2021
@SDGGiesbrecht SDGGiesbrecht deleted the tests branch November 19, 2021 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants