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

[question] associating test results to an existing conan package #10823

Closed
iaavo opened this issue Mar 18, 2022 · 3 comments
Closed

[question] associating test results to an existing conan package #10823

iaavo opened this issue Mar 18, 2022 · 3 comments
Assignees

Comments

@iaavo
Copy link

iaavo commented Mar 18, 2022

Here is a draft of our use case:

 ____________________          __________________________
|                    |        |                          |
| Build + Smoke Test |  -->   | Nightly Integration Test |
|____________________|        |__________________________|

The output of the Build + Smoke Test stage is a Conan package including test results (e.g. in xml format) uploaded to an artifactory repository.
During the night, the Nightly Integration Test is run which takes the existing Conan package from artifactory and runs the integration test. This stage also generates some test results.

Now the question is, how and where do we store the test results from the nightly integration test? Due to the package immutability principle it seems wrong to me to upload a new package with the same name and version but with additional test results. Or maybe I'm looking at that principle in a too strict way?

@memsharded
Copy link
Member

Hi @iaavo

One of the things is that you cannot have a dependency loop (at least in Conan 1.X), so you cannot have one package (lets call it pkg/1.0) depend on itself. So it is not possible to "extend" one package with extra tests results in the first place, not only because of the immutability principle, but because you cannot depend on that package to use it, because that would introduce a loop.

Defining a pkg_nightly_tests/1.0 package that depends on pkg/1.0 is indeed doable, and the pkg_nightly_tests should probably only store the tests results, but not the built binaries. Maybe under that flow, it would also make sense to separate the "smoke" tests in its own package, and leave the main pkg/1.0 to store the binaries only. But I am not sure if that is what makes sense given your flow. Could you please elaborate a bit further?

@iaavo
Copy link
Author

iaavo commented Dec 8, 2023

This question has been resolved by #13330

@iaavo iaavo closed this as completed Dec 8, 2023
@memsharded
Copy link
Member

Thanks for following up and closing @iaavo

Indeed, the "metadata files" feature described in https://blog.conan.io/2023/10/24/Conan-launches-metadata-files.html is intended to store tests and other side artifacts.

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

No branches or pull requests

2 participants