diff --git a/brotli-fix-metadata.diff b/brotli-fix-metadata.diff index aad224f..b409fee 100644 --- a/brotli-fix-metadata.diff +++ b/brotli-fix-metadata.diff @@ -1,5 +1,5 @@ --- brotli-7.0.0/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ brotli-7.0.0/Cargo.toml 2024-10-02T11:16:18.293205+00:00 ++++ brotli-7.0.0/Cargo.toml 2024-10-02T12:36:40.453552+00:00 @@ -36,6 +36,15 @@ ] license = "BSD-3-Clause AND MIT" diff --git a/rust-brotli.spec b/rust-brotli.spec index b074b07..3aa7b8e 100644 --- a/rust-brotli.spec +++ b/rust-brotli.spec @@ -268,7 +268,26 @@ use the "vector_scratch_space" feature of the "%{crate}" crate. %if %{with check} %check +%if 0%{?__isa_bits} != 32 %cargo_test +%else +# Few tests fail with OOM on 32bit +# https://github.com/dropbox/rust-brotli/issues/42 +# A fix was included in 7.0.0, but it was not entirely successful: +# https://github.com/dropbox/rust-brotli/issues/42#issuecomment-2388527527 +skip="${skip-} --skip enc::test::test_roundtrip_10x10y" +skip="${skip-} --skip enc::test::test_roundtrip_64x" +skip="${skip-} --skip enc::test::test_roundtrip_asyoulik" +skip="${skip-} --skip enc::test::test_roundtrip_asyoulik9_5" +skip="${skip-} --skip enc::test::test_roundtrip_backward65536" +skip="${skip-} --skip enc::test::test_roundtrip_compressed_repeated" +skip="${skip-} --skip enc::test::test_roundtrip_monkey" +skip="${skip-} --skip enc::test::test_roundtrip_quickfox" +skip="${skip-} --skip enc::test::test_roundtrip_quickfox_repeated" +skip="${skip-} --skip enc::test::test_roundtrip_ukkonooa" +skip="${skip-} --skip enc::test::test_roundtrip_x" +%cargo_test -- -- --exact ${skip-} +%endif %endif %changelog diff --git a/rust2rpm.toml b/rust2rpm.toml index 99b3bf5..553a263 100644 --- a/rust2rpm.toml +++ b/rust2rpm.toml @@ -19,6 +19,31 @@ hide = [ "benchmark", ] +[scripts.check] +pre = [ + "%if 0%{?__isa_bits} != 32", +] +post = [ + "%else", + "# Few tests fail with OOM on 32bit", + "# https://github.com/dropbox/rust-brotli/issues/42", + "# A fix was included in 7.0.0, but it was not entirely successful:", + "# https://github.com/dropbox/rust-brotli/issues/42#issuecomment-2388527527", + "skip=\"${skip-} --skip enc::test::test_roundtrip_10x10y\"", + "skip=\"${skip-} --skip enc::test::test_roundtrip_64x\"", + "skip=\"${skip-} --skip enc::test::test_roundtrip_asyoulik\"", + "skip=\"${skip-} --skip enc::test::test_roundtrip_asyoulik9_5\"", + "skip=\"${skip-} --skip enc::test::test_roundtrip_backward65536\"", + "skip=\"${skip-} --skip enc::test::test_roundtrip_compressed_repeated\"", + "skip=\"${skip-} --skip enc::test::test_roundtrip_monkey\"", + "skip=\"${skip-} --skip enc::test::test_roundtrip_quickfox\"", + "skip=\"${skip-} --skip enc::test::test_roundtrip_quickfox_repeated\"", + "skip=\"${skip-} --skip enc::test::test_roundtrip_ukkonooa\"", + "skip=\"${skip-} --skip enc::test::test_roundtrip_x\"", + "%cargo_test -- -- --exact ${skip-}", + "%endif", +] + [[package.extra-patches]] number = 10 file = "https://github.com/dropbox/rust-brotli/pull/219.patch"