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

Don’t include module name in test IDs #1726

Closed
ahoppen opened this issue Sep 29, 2024 · 2 comments
Closed

Don’t include module name in test IDs #1726

ahoppen opened this issue Sep 29, 2024 · 2 comments

Comments

@ahoppen
Copy link
Member

ahoppen commented Sep 29, 2024

Determining the module name of a test in the syntactic test scanner requires us to get build settings, which can be slow while the build system generates the build graph. With #1662, I don’t think it’s necessary to include the module name in the test ID anymore to differentiate test suites with the same name in different modules.

@ahoppen
Copy link
Member Author

ahoppen commented Oct 14, 2024

Synced to Apple’s issue tracker as rdar://137886483

@ahoppen
Copy link
Member Author

ahoppen commented Nov 22, 2024

Looks like we can’t drop the module name because otherwise test classes become ambiguous if a test class with the same name is defined in two modules.

Eg.

Tests/MyLibraryTests/MyTests.swift

import XCTest

class MyTests: XCTestCase {
  func testMyLibrary() {}
}

Tests/MyLibraryTests2/MyTests2.swift

import XCTest

class MyTests: XCTestCase {
  func testMyLibrary() {}
}

@ahoppen ahoppen closed this as completed Nov 22, 2024
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

No branches or pull requests

1 participant