Skip to content

Test: Merge IntegrationTests into Tests #8223

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

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

bkhouri
Copy link
Contributor

@bkhouri bkhouri commented Jan 15, 2025

Consolidate all the tests into a single folders. This change only moves the IntegrationTests/Sources and IntegrationTests/Tests to their respective directory.

A subsequent change will find better homes for the tests under Tests/IntegrationTests.

Depends on: swiftlang/swift#81217
Depends on: #8685

@bkhouri bkhouri marked this pull request as ready for review January 15, 2025 23:59
@bkhouri bkhouri force-pushed the t/main/merge_integration_tests_into_tests branch from 38c52f7 to 6132396 Compare March 19, 2025 20:38
@bkhouri bkhouri force-pushed the t/main/merge_integration_tests_into_tests branch from 6132396 to 65725d0 Compare March 19, 2025 20:39
@bkhouri bkhouri marked this pull request as draft March 19, 2025 20:40
@bkhouri bkhouri marked this pull request as ready for review March 19, 2025 20:40
@bkhouri bkhouri force-pushed the t/main/merge_integration_tests_into_tests branch from 65725d0 to 38aa16d Compare March 24, 2025 17:41
@bkhouri
Copy link
Contributor Author

bkhouri commented Mar 24, 2025

@swift-ci please test

@bkhouri bkhouri force-pushed the t/main/merge_integration_tests_into_tests branch from 38aa16d to 3dad0aa Compare April 1, 2025 22:56
@bkhouri
Copy link
Contributor Author

bkhouri commented Apr 1, 2025

@swift-ci please test

@Suite
private struct BasicTests {
@Test(
.disabled("The `swift` command line is not a swift package manager executable target"),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

question: should we simple delete this test?

@@ -94,6 +104,7 @@ private struct BasicTests {
}

@Test(
.disabled("The `swiftc` command line is not a swift package manager executable target"),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

question: Should we re-work this test so it does not rely on swiftc?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

chore (blocking): This file is not used and should be removed.


public let swiftBuild: AbsolutePath = swiftpmBinaryDirectory.appending(component: "swift-build")
// public let swiftpmBinaryDirectory: AbsolutePath = {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

chore (blocking): remove lie 111 to 127. They should be replaced with the executeSwift* functions.

@bkhouri
Copy link
Contributor Author

bkhouri commented Apr 1, 2025

@swift-ci please test self hosted windows

@bkhouri
Copy link
Contributor Author

bkhouri commented Apr 1, 2025

@swift-ci please test windows

@bkhouri bkhouri added the test suite improvements to SwiftPM test suite label Apr 8, 2025
bkhouri added a commit that referenced this pull request Apr 9, 2025
Until #8223 is fixed copy some helpers from
`IntergrationTests/Source/IntegrationTests` to
`Test/_InternalTestSupport` so we can re-use the functionality.

Related to: #8433
rdar://148248105
bkhouri added a commit to bkhouri/swift-package-manager that referenced this pull request Apr 10, 2025
Until swiftlang#8223 is fixed copy some helpers from
`IntergrationTests/Source/IntegrationTests` to
`Test/_InternalTestSupport` so we can re-use the functionality.

Related to: swiftlang#8433
rdar://148248105

(cherry picked from commit e303b89)
@bkhouri bkhouri mentioned this pull request Apr 10, 2025
bkhouri added a commit to bkhouri/swift-package-manager that referenced this pull request Apr 15, 2025
Until swiftlang#8223 is fixed copy some helpers from
`IntergrationTests/Source/IntegrationTests` to
`Test/_InternalTestSupport` so we can re-use the functionality.

Also, to workaround a Build preset issue, add a dependency on Swift
Testing when we are building using local dependencies.

Related to: swiftlang#8433
rdar://148248105
bkhouri added a commit to bkhouri/swift-package-manager that referenced this pull request Apr 16, 2025
Until swiftlang#8223 is fixed copy some helpers from
`IntergrationTests/Source/IntegrationTests` to
`Test/_InternalTestSupport` so we can re-use the functionality.

Related to: swiftlang#8433
rdar://148248105

(cherry picked from commit e303b89)
bkhouri added a commit to bkhouri/swift-package-manager that referenced this pull request Apr 16, 2025
Until swiftlang#8223 is fixed copy some helpers from
`IntergrationTests/Source/IntegrationTests` to
`Test/_InternalTestSupport` so we can re-use the functionality.

Also, to workaround a Build preset issue, add a dependency on Swift
Testing when we are building using local dependencies.

Related to: swiftlang#8433
rdar://148248105
bkhouri added a commit to bkhouri/swift-package-manager that referenced this pull request Apr 16, 2025
Until swiftlang#8223 is fixed copy some helpers from
`IntergrationTests/Source/IntegrationTests` to
`Test/_InternalTestSupport` so we can re-use the functionality.

Related to: swiftlang#8433
rdar://148248105
bkhouri added a commit to bkhouri/swift-package-manager that referenced this pull request Apr 21, 2025
Until swiftlang#8223 is fixed copy some helpers from
`IntergrationTests/Source/IntegrationTests` to
`Test/_InternalTestSupport` so we can re-use the functionality.

Related to: swiftlang#8433
rdar://148248105
@bkhouri bkhouri force-pushed the t/main/merge_integration_tests_into_tests branch 2 times, most recently from f927311 to 845e74b Compare April 29, 2025 17:01
@bkhouri
Copy link
Contributor Author

bkhouri commented Apr 29, 2025

@swift-ci test

@bkhouri bkhouri force-pushed the t/main/merge_integration_tests_into_tests branch from 845e74b to a736367 Compare April 29, 2025 18:57
@bkhouri
Copy link
Contributor Author

bkhouri commented Apr 29, 2025

@swift-ci test

bkhouri added a commit to bkhouri/swift-package-manager that referenced this pull request Apr 29, 2025
Until swiftlang#8223 is fixed copy some helpers from
`IntergrationTests/Source/IntegrationTests` to
`Test/_InternalTestSupport` so we can re-use the functionality.

Related to: swiftlang#8433
rdar://148248105
@bkhouri
Copy link
Contributor Author

bkhouri commented Apr 30, 2025

swiftlang/swift#81217

@swift-ci test

@bkhouri bkhouri force-pushed the t/main/merge_integration_tests_into_tests branch from a736367 to 9253e52 Compare April 30, 2025 21:48
@bkhouri
Copy link
Contributor Author

bkhouri commented Apr 30, 2025

swiftlang/swift#81217

@swift-ci test

@bkhouri bkhouri force-pushed the t/main/merge_integration_tests_into_tests branch from 9253e52 to b02b187 Compare May 1, 2025 02:27
@bkhouri
Copy link
Contributor Author

bkhouri commented May 1, 2025

swiftlang/swift#81217

@swift-ci test

@bkhouri bkhouri enabled auto-merge (squash) May 1, 2025 02:28
@bkhouri
Copy link
Contributor Author

bkhouri commented May 1, 2025

swiftlang/swift#81217

@swift-ci test

bkhouri added a commit to bkhouri/swift-package-manager that referenced this pull request May 13, 2025
Until swiftlang#8223 is fixed copy some helpers from
`IntergrationTests/Source/IntegrationTests` to
`Test/_InternalTestSupport` so we can re-use the functionality.

Related to: swiftlang#8433
rdar://148248105
bkhouri added a commit that referenced this pull request May 14, 2025
Until #8223 is fixed copy some helpers from
`IntergrationTests/Source/IntegrationTests` to
`Test/_InternalTestSupport` so we can re-use the functionality.

Related to: #8433
rdar://148248105
Depends on: swiftlang/swift#81401
bkhouri added 5 commits May 16, 2025 16:05
When SwiftPM exeuctes tests using the native build system, the bundle
path was failing on MacOS as the `Bundle.allBundles` did not contain the
`.xctest` bundle.

If we fail to find the .xctest bundle, we inspect the command line
argument for the `--test-bundle-path` argument and contruct the macOS
bundle root based on the argument value.

In addition, convert the StaticBinaryLibraryTests to Swift Testing to
validate the logic works.
Consolidate all the tests into a single folders.  This change only moves
the IntegrationTests/Sources and IntegrationTests/Tests to their
respective directory.

A subsequent change will find better homes for the tests under
Tests/IntegrationTests.
@bkhouri bkhouri force-pushed the t/main/merge_integration_tests_into_tests branch from b02b187 to 6898ac6 Compare May 16, 2025 23:01
@bkhouri bkhouri marked this pull request as draft May 16, 2025 23:02
auto-merge was automatically disabled May 16, 2025 23:02

Pull request was converted to draft

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test suite improvements to SwiftPM test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant