Skip to content

Conversation

plemarquand
Copy link
Contributor

Motivation:

Generate tests for the .executable and .tool template types when generating a new package with swift package init

Modifications:

Add test targets to these types, and generate the templated test code. Also converts over the InitTests to swift-testing and uses parameterized tests to test the different types all produce tests as expected.

Issue: #8990

@plemarquand
Copy link
Contributor Author

Keeping this in draft until #8993 is merged, at which point some of the swift testing utilities inlined in the InitTests.swift file can be removed or ported to Sources/_InternalTestSupport/SwiftTesting+Helpers.swift which is introduced in that PR.

@plemarquand plemarquand force-pushed the init-executable-tool-create-tests branch from aa77289 to b42fdf1 Compare August 5, 2025 21:40
@plemarquand
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@bkhouri bkhouri left a comment

Choose a reason for hiding this comment

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

I understand this is a draft, but we need to also migrate all the custom XCT helpers.

@plemarquand
Copy link
Contributor Author

@swift-ci please test

@plemarquand
Copy link
Contributor Author

@swift-ci test windows

@plemarquand
Copy link
Contributor Author

@swift-ci test linux

@plemarquand
Copy link
Contributor Author

@swift-ci test windows

@plemarquand plemarquand force-pushed the init-executable-tool-create-tests branch from 33998c2 to d4968ab Compare August 8, 2025 17:52
@plemarquand
Copy link
Contributor Author

@swift-ci test

@plemarquand
Copy link
Contributor Author

@swift-ci test

@plemarquand
Copy link
Contributor Author

Now that #9032 is merged I'm going to close this and extract out the work to convert these tests to swift-testing into its own PR.

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.

2 participants