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

Test/scripts: move shared code to imgtestlib (HMS-5242) #1123

Merged
merged 4 commits into from
Jan 6, 2025

Conversation

thozza
Copy link
Member

@thozza thozza commented Jan 3, 2025

  • Move find_image_file() from boot-image to imgtestlib so that a new script generating the image-info report can use it later.
  • Define common {read,write}_build_info() functions in imgtestlib to read/write build info.json and use them everywhere.

/jira-epic COMPOSER-2318

JIRA: HMS-5242

thozza added 4 commits January 3, 2025 12:03
Move the function to the `imgtestlib`, so that it can be later shared
among multiple scripts. The intention is to use it later in a script to
generate the "image-info" report.

Signed-off-by: Tomáš Hozza <[email protected]>
Move the function to the `imgtestlib`, so that it can be later shared
among multiple scripts. The intention is to use it later in a script to
generate the "image-info" report.

Signed-off-by: Tomáš Hozza <[email protected]>
Also add doc string.

Signed-off-by: Tomáš Hozza <[email protected]>
Add a new helper function `write_build_info()` to imgtestlib, to ensure
consistent way to write the build `info.json` and de-duplicate code.
Modify all remaining places which read / write `info.json` to use
functions from imgtestlib.

Signed-off-by: Tomáš Hozza <[email protected]>
@schutzbot schutzbot changed the title Test/scripts: move shared code to imgtestlib Test/scripts: move shared code to imgtestlib (HMS-5242) Jan 3, 2025
@thozza thozza requested a review from achilleas-k January 3, 2025 13:19
Copy link
Contributor

@mvo5 mvo5 left a comment

Choose a reason for hiding this comment

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

Thank you

Copy link
Contributor

@bcl bcl left a comment

Choose a reason for hiding this comment

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

Looks good!

@supakeen supakeen added this pull request to the merge queue Jan 6, 2025
Merged via the queue into osbuild:main with commit 5b6aa48 Jan 6, 2025
19 checks passed
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.

5 participants