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

Skip cmake.test and meson.test using [conf] profile #9218

Merged
merged 5 commits into from Jul 9, 2021

Conversation

uilianries
Copy link
Member

@uilianries uilianries commented Jul 6, 2021

Not only CMake offers test, but Meson also has the same method.

The original issue uses skip_tests (plural), but I think test is better, because is same method name.

Changelog: Feature: Skip build helper test and using [conf].
Docs: conan-io/docs#2154

close #8454

/cc @chausner

  • Refer to the issue that supports this Pull Request.
  • If the issue has missing info, explain the purpose/use case/pain/need that covers this Pull Request.
  • I've read the Contributing guide.
  • I've followed the PEP8 style guides for Python code.
  • I've opened another PR in the Conan docs repo to the develop branch, documenting this one.

Note: By default this PR will skip the slower tests and will use a limited set of python versions. Check here how to increase the testing level by writing some tags in the current PR body text.

Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

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

I think this is interesting, but probably we should further standardize the "run-test" concepts. There is demand for something more built-in and more generic, also to create conditional requirements, etc. So maybe the cmake:skip_test and meson:skip_test are not the best, and we should define something general, in the line of tools.build:skip_tests. Or maybe the default should be to skip tests and tests are only enabled on demand? tools.build:tests?

Lets see what others think.

@uilianries
Copy link
Member Author

tools.build:tests

I like it. More generic and can be re-used for other helpers.

Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

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

I like this.

My main question is what is the right default for the future:

  • Recipes, including if we want ConanCenter can add building and running tests support.
  • By default tests do not build and run (good default for ConanCenter). It is possible to [conf] sometihng like tools.build:tests=True, and tests will build and run
  • By default tests build and run (bad default for ConanCenter, probably the tools.build:skip_tests=True should be enforced by CI, and hooks).

Wdyt @lasote?

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

Successfully merging this pull request may close these issues.

[feature] Using [conf] block in profiles to skip running tests as part of build()
3 participants