Skip to content

No content is built in downstream Fedora CI #674

Description

@jan-cerny

When a pull request is created in Fedora Pagure packit tests are automatically triggered. The /static-checks/rpmbuild-ctest fails because no content is built as a part of the test.

Example Fedora PR: https://src.fedoraproject.org/rpms/scap-security-guide/pull-request/81

The /static-checks/rpmbuild-ctest first tries to build scap-security-guide but it doesn't build any content for any product, all products are disabled, but it tries to build a non-existent RHEL 45 product. Notice the -DSSG_PRODUCT_RHEL45:BOOL=ON in the cmake command.

2026-09-03 16:15:04 test.py:17: lib.util.content.build_content:241: running: cmake ../ -DCMAKE_BUILD_TYPE:STRING=Release -DSSG_CENTOS_DERIVATIVES_ENABLED:BOOL=OFF -DSSG_PRODUCT_DEFAULT:BOOL=OFF -DSSG_PRODUCT_RHEL45:BOOL=ON -DSSG_SCE_ENABLED:BOOL=ON -DSSG_BASH_SCRIPTS_ENABLED:BOOL=OFF -DSSG_BUILD_DISA_DELTA_FILES:BOOL=OFF -DSSG_SEPARATE_SCAP_FILES_ENABLED:BOOL=OFF -DSSG_ANSIBLE_PLAYBOOKS_PER_RULE_ENABLED:BOOL=ON

Then, the test attempts to run CTest tests, but since there was no content built, there are 2 problems:

  1. the set of the CTest tests is very limited
  2. some tests fail because lack of testable content

The problem 2 manifests as this traceback:

Traceback (most recent call last):
  File "/var/tmp/tmp4vhg0ciq/BUILD/scap-security-guide-0.1.82-build/scap-security-guide-0.1.82/tests/test_profile_variables.py", line 261, in <module>
    sys.exit(main())
             ~~~~^^
  File "/var/tmp/tmp4vhg0ciq/BUILD/scap-security-guide-0.1.82-build/scap-security-guide-0.1.82/tests/test_profile_variables.py", line 200, in main
    raise RuntimeError("No built products found (no rule_variable_mapping.json files)")
RuntimeError: No built products found (no rule_variable_mapping.json files)

We need to modify how the content is built in the test in static-checks/rpmbuild-ctest/test.py, perhaps add support for Fedora to the build_content function in lib/util/content.py.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions