diff --git a/brotli-fix-metadata.diff b/brotli-fix-metadata.diff index 7376af8..8e4d818 100644 --- a/brotli-fix-metadata.diff +++ b/brotli-fix-metadata.diff @@ -1,5 +1,5 @@ --- brotli-6.0.0/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ brotli-6.0.0/Cargo.toml 2024-09-29T16:35:06.176128+00:00 ++++ brotli-6.0.0/Cargo.toml 2024-10-01T14:59:41.120768+00:00 @@ -34,8 +34,17 @@ "compression", "no-std", diff --git a/rust-brotli.spec b/rust-brotli.spec index 0c56770..de3bb73 100644 --- a/rust-brotli.spec +++ b/rust-brotli.spec @@ -222,7 +222,24 @@ find -type f -name '*.rs' -executable -exec chmod -x '{}' + %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 +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 9f04b3a..5560c7e 100644 --- a/rust2rpm.toml +++ b/rust2rpm.toml @@ -36,6 +36,29 @@ pre = [ "find -type f -name '*.rs' -executable -exec chmod -x '{}' +", ] +[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", + "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 = "brotli-6.0.0-license-accuracy.patch"