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

Feature request: Make building and executing tests mandatory #20784

Open
HappySeaFox opened this issue Oct 16, 2021 · 5 comments
Open

Feature request: Make building and executing tests mandatory #20784

HappySeaFox opened this issue Oct 16, 2021 · 5 comments
Assignees
Labels
category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed requires:discussion

Comments

@HappySeaFox
Copy link
Contributor

HappySeaFox commented Oct 16, 2021


Is your feature request related to a problem? Please describe.

For now, it's totally up to the port maintainer to control if the port is functional or not. Most probably maintainers don't test ports on every supported platform and in debug/release mode on every platform.

This is why it's totally possible to commit partially functional ports.

For example, HappySeaFox/sail#128

Proposed solution

Make building and executing tests in ports mandatory. This way we can make sure every port is functional on every platform and build mode. At least, this is a minimal quality control we can implement.

If a port doesn't have any tests or example applications to build, it may be recommended to add one explicitly by the port maintainer.

Also, it would be great to compile a small external test application against a port with cmake -DCMAKE_TOOLCHAIN_FILE=.... This is needed because of possibly broken cmake rules in some ports. See
#21234

Describe alternatives you've considered
-

Additional context
-

@JackBoosY JackBoosY added the category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed label Oct 18, 2021
@JackBoosY
Copy link
Contributor

Yes, we need this.
I hope that upstream provides test code for testing after build, and vcpkg should also be tested against the generated cmake or other configurations.

Related: #15173.

@JackBoosY
Copy link
Contributor

And I think we need to discuss how to implement it using a unified interface.

@HappySeaFox
Copy link
Contributor Author

HappySeaFox commented Feb 24, 2023

Another uncaught port issue caused by the fact that we don't execute tests: HappySeaFox/sail#190. Fixed by #29809

@HappySeaFox
Copy link
Contributor Author

I also propose two possible ways to test the built port: 1) introduce a function to simply run cmake tests with ctest 2) allow the user to run a specific test executable

This way I can choose how to test the built port in portfile.

@HappySeaFox
Copy link
Contributor Author

Hi! Any progress? I'm sure this is a great investment into the ports' stability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed requires:discussion
Projects
None yet
Development

No branches or pull requests

3 participants