https://bugs.kde.org/show_bug.cgi?id=524180

            Bug ID: 524180
           Summary: Clazy's test suite assumes a monolithic Qt
                    installation
    Classification: Developer tools
           Product: clazy
      Version First unspecified
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
  Target Milestone: ---

DESCRIPTION

I was trying to run the test suite of clazy 1.17.1 on GNU Guix, and it proved
challenging, because of assumptions that do not hold on this system; a few
tests would fail because they would expect that the Qt installation layout was
monolithic, e.g. all at the same installation prefix, while in Guix every Qt
component are packaged separately (what Qt called a modular install).

STEPS TO REPRODUCE
1. Install Qt as modules
2. Try to run the test suite
3. Observe failures.

OBSERVED RESULT
Only the qtbase includes are detected/honored. Tests expecting qtdeclarative or
other includes fail.

EXPECTED RESULT
All tests should pass.

SOFTWARE/OS VERSIONS
Operating System (available in the Info Center app, or by running `kinfo` in a
terminal window): Guix System
KDE Plasma Version: N/a
KDE Frameworks Version: N/A
Qt Version: 6.11.1

ADDITIONAL INFORMATION
Worked around via some patching to find qtdeclarative headers and
de-registration of a test:

               (add-after 'unpack 'register-qtdeclarative-include
                 ;; The qtinstallation.py script also assumes a monolithic Qt,
                 ;; causing the needed qtdeclarative includes to not be found
                 ;; in tests.
                 (lambda* (#:key native-inputs inputs #:allow-other-keys)
                   (substitute* "tests/testutils/qtinstallation.py"
                     (("        additional_args = \"\"" anchor)
                      (format #f "\
        qt_modules_includes.append('-isystem ~a')\n~a"
                              (dirname (search-input-directory
                                        (or native-inputs inputs)
                                        "include/qt6/QtQml"))
                              anchor)))))

(add-after 'unpack 'disable-problematic-tests
                 (lambda _
                   (substitute* "ClazyTests.generated.cmake"
                     ;; This test expects a monolithic Qt.
                     ((".*no-module-include.*") "")
                     ;; This one requires QtStateMachine.
                     ((".*old-style-connect.*") ""))))

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to