• Bug#1064239: gxr FTCBFS: attempts to run tests despite DEB_BUILD_OPTION

    From Helmut Grohne@21:1/5 to All on Sun Feb 18 22:20:02 2024
    Source: gxr
    Version: 0.15.1-4
    Tags: patch
    User: debian-cross@lists.debian.org
    Usertags: ftcbfs

    gxr fails to cross build from source, because it attempts to run tests
    and badly fails doing so (at the meson build step already). Usually
    cross builds disable testing via DEB_BUILD_OPTIONS=nocheck. I'm
    attaching a patch that makes gxr honour this option and using it makes
    the cross build succeed (without testing). Please consider applying it.

    Helmut

    diff --minimal -Nru gxr-0.15.1/debian/changelog gxr-0.15.1/debian/changelog
    --- gxr-0.15.1/debian/changelog 2022-08-03 12:38:08.000000000 +0200
    +++ gxr-0.15.1/debian/changelog 2024-02-18 18:46:36.000000000 +0100
    @@ -1,3 +1,10 @@
    +gxr (0.15.1-4.1) UNRELEASED; urgency=medium
    +
    + * Non-maintainer upload.
    + * Support DEB_BUILD_OPTIONS=nocheck. (Closes: #-1)
    +
    + -- Helmut Grohne <helmut@subdivi.de> Sun, 18 Feb 2024 18:46:36 +0100
    +
    gxr (0.15.1-4) unstable; urgency=medium

    * Team upload.
    diff --minimal -Nru gxr-0.15.1/debian/rules gxr-0.15.1/debian/rules
    --- gxr-0.15.1/debian/rules 2022-08-03 12:38:08.000000000 +0200
    +++ gxr-0.15.1/debian/rules 2024-02-18 18:46:34.000000000 +0100
    @@ -11,9 +11,10 @@
    HOME=$(CURDIR)/debian/tmp-home XDG_CACHE_HOME=

    override_dh_auto_test:
    +ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
    install -d $(CURDIR)/debian/tmp-home/.cache/gxr
    # Run tests without VR runtime
    env $(test_env) meson build
    env $(test_env) ninja -C build
    env $(test_env) meson test -C build/ --no-suite gxr:xr --no-suite post-install
    -
    +endif

    ---