• Re: [gentoo-dev] [PATCH] cargo.eclass: respect MAKEOPTS for `cargo test

    From Arthur Zamarin@21:1/5 to Sam James on Tue Jan 28 17:40:01 2025
    To: sam@gentoo.org (Sam James)
    Copy: rust@gentoo.org

    This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------RP160UMPQsddKw4Gs12sVwbL
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: quoted-printable

    On 28/01/2025 14:16, Sam James wrote:
    Without this, while (test) compile jobs respect MAKEOPTS via our config settings
    already deployed via the eclass, *test* jobs do not.

    We may want to consider setting NEXTEST_TEST_THREADS and/or having
    a cargo_enable_tests helper in the eclass at some point too.

    Bug: https://github.com/rust-lang/cargo/issues/8430
    Signed-off-by: Sam James <sam@gentoo.org>
    ---
    Pushed.

    eclass/cargo.eclass | 3 +++
    1 file changed, 3 insertions(+)

    diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass
    index 0bc24feea222e..25a2127f6391f 100644
    --- a/eclass/cargo.eclass
    +++ b/eclass/cargo.eclass
    @@ -396,6 +396,9 @@ cargo_gen_config() {
    jobs = $(makeopts_jobs)
    incremental = false

    + [env]
    + RUST_TEST_THREADS = "$(makeopts_jobs)"
    +
    [term]
    verbose = true
    $([[ "${NOCOLOR}" = true || "${NOCOLOR}" = yes ]] && echo "color = 'never'")

    LGTM from me (rust project member)

    --
    Arthur Zamarin
    arthurzam@gentoo.org
    Gentoo Linux developer (Council, Python, pkgcore stack, QA, Rust)

    --------------RP160UMPQsddKw4Gs12sVwbL--

    -----BEGIN PGP SIGNATURE-----

    iQEzBAEBCgAdFiEE/axFlFuH2ptjtO5EAqCvUD0SBQQFAmeZBqcACgkQAqCvUD0S BQRpxwgAuUtE5xwe/lF/18USv66gGu6EBcp/R/TxsI2aeAfI9PgHouTT9Wxx23KR qYYHRLAE1OpkhzU+oom+TElhLqHnDvHEYk1kTs+m+LMQ1Cg172Q+4PdbT2o0qbR6 uIFOX9hQTCRDnX/VryiQOvv/zF6ww6u28vyPxPobdFnzaFf44JYBGyxvIFmbjg8g 77+FzvFOSHA+l80j70N6dDe9sx9/GWJie2JOoHSfmmkq3evvFH9TShT9091ycTLt EvYhMLdUDotPJA+Dmfaz2pIn3KZ9oaUk5X2mGp5z1Ipt8xu3RcBvv3CfsxpucFGS eL38b5+YjbzHC3Of5g5VZf7eF/CBpw==
    =pIO+
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)