• Thomas Haller's avatar
    contrib/rpm: disable tests by default and use fatal-warnings with tests · ad850c4f
    Thomas Haller authored
    In general, when we build a package, we want no compiler warnings
    and all unit tests to pass.
    That is in particular true when building a package for the distribution
    in koji. When builing in koji, we (rightly) cannot pass rpmbuild options, so
    the default whether tests/compiler-warnings are fatal matter very much.
    One could argue: let's have the tests/compiler-warnings fatal and fail the build.
    During a build in koji for a Fedora release, we want them all pass. And if somebody
    does a manual build, the person can patch the spec file (or use rpmbuild
    However, note how commit "f7b5e48c contrib/rpm: don't force fatal warnings
    with tests" already disabled fatal compiler warnings. Why? It seems
    compiler warnings should be even more stable than our unit tests, as long
    as you target a particular Fedora release and compiler version. So this
    was done to support rebuilding an SRPM for a different Fedora release,
    or to be more graceful during early development phase of a Fedora
    release, where things are not as stable yet.
    The exactly same reasoning applies to treating unit-tests failures as fatal.
    For example, a recent iproute2 issue broke unit tests. That meant, with
    that iproute2 release in build root, the NetworkManager RPM could not be built.
    Very annoying.
    - if "test" is enabled, that means both `make check` and compiler warnings
      are treated fatal. If "test" is disabled, `make check` and compiler
      warnings are still done, just not fatal.
    - "test" is now disabled by default via the spec file. They are not fatal
      when building in koji or when rebuilding the package manually.
    - tests can be enabled optionally. Note that the "build_clean.sh"
      script enables them by default. So, a user using this script would
      need to explicitly "--without test".
build_clean.sh 4.96 KB