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

Ensure ctest fails if no unit tests are found #2027

Merged
merged 3 commits into from
Feb 11, 2025

Conversation

Molter73
Copy link
Collaborator

@Molter73 Molter73 commented Feb 6, 2025

Description

Ensure ctest fails when not finding any tests to be run.

Additionally, unpin cmake version on Konflux builds and bring some changes over from downstream.

Checklist

  • Investigated and inspected CI test results
  • Updated documentation accordingly

Automated testing

  • Added unit tests
  • Added integration tests
  • Added regression tests

If any of these don't apply, please comment below.

Testing Performed

  • Check unit tests are properly run in konflux.

@Molter73 Molter73 marked this pull request as ready for review February 6, 2025 15:27
@Molter73 Molter73 requested a review from a team as a code owner February 6, 2025 15:27
@Molter73 Molter73 requested a review from a team February 6, 2025 15:28
@Molter73
Copy link
Collaborator Author

Molter73 commented Feb 6, 2025

Added @stackrox/rhtap-maintainers as reviewers for the konflux dockerfile changes.

Copy link
Contributor

@tommartensen tommartensen left a comment

Choose a reason for hiding this comment

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

You mention that the cmake version in Konflux doesn't support the --test-dir flag and therefore we need to do a workaround. Can we instead bump the cmake version in Konflux to one that does support the flag?

@Molter73
Copy link
Collaborator Author

Molter73 commented Feb 6, 2025

You mention that the cmake version in Konflux doesn't support the --test-dir flag and therefore we need to do a workaround. Can we instead bump the cmake version in Konflux to one that does support the flag?

I would love to, but it is installed using dnf and I'm pretty sure it is using the latest available one.

@Molter73 Molter73 requested a review from tommartensen February 6, 2025 16:10
Copy link
Contributor

@tommartensen tommartensen left a comment

Choose a reason for hiding this comment

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

Regarding cmake:
We (I) pinned the version to the same as downstream: https://gitlab.cee.redhat.com/stackrox/rhacs-midstream/-/blob/rhacs-1.0-rhel-8/distgit/containers/rhacs-collector/Dockerfile.in?ref_type=heads#L20.

podman run -it registry.access.redhat.com/ubi8/ubi:latest
[root@cdd583c3fe19 /]# dnf install -y cmake
...
======================================================================================================================================================================================================================
 Package                                            Architecture                              Version                                                    Repository                                              Size
======================================================================================================================================================================================================================
Installing:
 cmake                                              aarch64                                   3.26.5-2.el8                                               ubi-8-appstream-rpms                                    12 M
Installing dependencies:
 cmake-data                                         noarch                                    3.26.5-2.el8                                               ubi-8-appstream-rpms                                   1.9 M
 cmake-filesystem                                   aarch64                                   3.26.5-2.el8                                               ubi-8-appstream-rpms                                    45 k
 cmake-rpm-macros                                   noarch                                    3.26.5-2.el8                                               ubi-8-appstream-rpms                                    44 k
 emacs-filesystem                                   noarch                                    1:26.1-12.el8_10                                           ubi-8-baseos-rpms                                       70 k
 libuv                                              aarch64                                   1:1.41.1-2.el8_10                                          ubi-8-appstream-rpms                                   150 k
 make                                               aarch64                                   1:4.2.1-11.el8                                             ubi-8-baseos-rpms                                      490 k
 vim-filesystem                                     noarch                                    2:8.0.1763-19.el8_6.4                                      ubi-8-appstream-rpms                                    50 k

...

Installed:
  cmake-3.26.5-2.el8.aarch64           cmake-data-3.26.5-2.el8.noarch      cmake-filesystem-3.26.5-2.el8.aarch64            cmake-rpm-macros-3.26.5-2.el8.noarch      emacs-filesystem-1:26.1-12.el8_10.noarch
  libuv-1:1.41.1-2.el8_10.aarch64      make-1:4.2.1-11.el8.aarch64         vim-filesystem-2:8.0.1763-19.el8_6.4.noarch

Complete!
[root@cdd583c3fe19 /]# cmake --version
cmake version 3.26.5

CMake suite maintained and supported by Kitware (kitware.com/cmake).

There are newer CMake versions available, could you attempt to update? 🙏

@Molter73
Copy link
Collaborator Author

Molter73 commented Feb 6, 2025

There are newer CMake versions available, could you attempt to update? 🙏

Was just checking and we unpinned the cmake version on the upstream builder 2 years ago, how did we not change this before? I'll try bumping it now.

@Molter73 Molter73 requested a review from tommartensen February 7, 2025 09:44
Copy link
Contributor

@tommartensen tommartensen left a comment

Choose a reason for hiding this comment

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

LGTM. Konflux build succeeds and the integration tests with the Konflux image passes. Please ensure that the cmake change will be ported to midstream as well. 🙏

@tommartensen tommartensen added the backport-for-4.6-konflux-release https://redhat-internal.slack.com/archives/C05TS9N0S7L/p1730134914487439 label Feb 10, 2025
@Molter73 Molter73 merged commit a1c66c7 into master Feb 11, 2025
143 of 147 checks passed
@Molter73 Molter73 deleted the mauro/fix-konflux-unit-tests branch February 11, 2025 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-for-4.6-konflux-release https://redhat-internal.slack.com/archives/C05TS9N0S7L/p1730134914487439
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants