Skip to content

Package Init - Generate tests for .executable, .tool #8995

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 6 commits into
base: main
Choose a base branch
from

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

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