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

Request library: cmake #14

Open
2 tasks
LecrisUT opened this issue Jun 14, 2023 · 1 comment
Open
2 tasks

Request library: cmake #14

LecrisUT opened this issue Jun 14, 2023 · 1 comment

Comments

@LecrisUT
Copy link

LecrisUT commented Jun 14, 2023

Some useful cmake plans and reusable tests:

  • Importing the cmake project via find_package and FetchContent
    • Need to make sure that the caller of tmt/plan/import installs the necessary packages. (Maybe this is handled automatically?)
    • Use an environment variable to specify the name of the package and git URL/tag to import
    • Have a mechanism to smoke test. Maybe using FetchContent to retrieve the necessary additional files to be run via add_subdirectory?
  • Running cmake/ctests through cmake presets
    • Similar to above, but running a full configure-build-test workflow
    • Specify a path where the CMakePresets.json should be called from

I am using some tmt/beakerlib tests in https://github.com/LecrisUT/CmakeExtraUtils, and it would be nice to make some of them reusable. But there are a few points that I could use some help in order to make them portable.

  • Are tmt plans run sequentially e.g. are the prepare steps run one after another in the same environment?
  • Can an imported tmt plan access the tmt tree of the calling plan? If so how to distinguish one from another or navigate through them? Basically the opposite of tests/require?

Pinging: @lukaszachy @psss @sopos

@psss
Copy link
Member

psss commented Jul 11, 2023

Are tmt plans run sequentially e.g. are the prepare steps run one after another in the same environment?

Currently tmt plans are run sequentially but each plan performs a separate guest provision step so there would be always a fresh/clean environment for each plan. In the future there is a plan to support executing plan in parallel as well.

Can an imported tmt plan access the tmt tree of the calling plan? If so how to distinguish one from another or navigate through them? Basically the opposite of tests/require?

For the imported plan the whole remote repository is cloned and the plan is initialized from there. If I remember correctly, as for now no access to the calling plan tree is provided. @adiosnb, any thoughts on this?

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

No branches or pull requests

2 participants