Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-120543

%ctest macro cannot pass any arguments

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • rhel-9.7
    • cmake
    • None
    • None
    • None
    • rhel-pt-go
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      %ctest macro seems not accepting any arguments, making it impossible to pass arguments to ctest program in a spec file:

      # rpm --eval '%ctest -V'
      error: Unknown option V in ctest(:-:)
      

      cmake-rpm-macros-3.26.5-2.el9.noarch defines the macro like this:

      %ctest(:-:) \
        cd "%{__cmake_builddir}" \
        %__ctest --output-on-failure --force-new-ctest-process %{?_smp_mflags} %{**} \
        cd -
      

      I'd like to pass -V option to the ctest program at the place of %{**} macro.

      I think the bug is in an option string of the %ctest macro definition. It should be a dash only without the colons, like in this example:

      $ rpm --define '%foo(-) before %{**} after' --eval '%foo -V'
      before -V after
      

      This is similar to RHEL-10 bug RHEL-85715.

              tstellar@redhat.com Thomas Stellard
              rhn-support-ppisar Petr Pisar
              Thomas Stellard Thomas Stellard
              Jesus Checa Hidalgo Jesus Checa Hidalgo
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: