summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2023-04-13 15:43:45 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2023-04-13 15:43:45 +0900
commit367508b61123110135ea7a3058dd85a82ba07c2f (patch)
tree27669792827cdc87391bfb66032615e2a2bf5d5b
parent445360d578409116aa39dad44710d2ed993f706d (diff)
downloadrust-ahash-accepted/tizen_unified.tar.gz
rust-ahash-accepted/tizen_unified.tar.bz2
rust-ahash-accepted/tizen_unified.zip
[ 25s] running 31 tests [ 25s] test fallback_hash::tests::test_conversion ... ok [ 25s] test fallback_hash::tests::test_hash ... ok [ 25s] test hash_map::test::test_borrow ... ok [ 25s] test hash_quality_test::fallback_tests::fallback_finish_is_consistant ... ok [ 25s] test hash_quality_test::fallback_tests::fallback_all_bytes_matter ... ok [ 25s] test hash_quality_test::fallback_tests::fallback_input_affect_every_byte ... ok [ 25s] test hash_quality_test::fallback_tests::fallback_keys_affect_every_byte ... ok [ 25s] test hash_quality_test::fallback_tests::fallback_keys_change_output ... ok [ 25s] test hash_quality_test::fallback_tests::fallback_length_extension ... ok [ 25s] test hash_quality_test::fallback_tests::fallback_single_key_bit_flip ... ok [ 25s] test hash_quality_test::fallback_tests::fallback_single_bit_flip ... ok [ 25s] test operations::test::test_add_length ... ok [ 25s] test operations::test::test_shuffle_contains_each_value ... ok [ 25s] test operations::test::test_shuffle_moves_every_value ... ok [ 25s] test operations::test::test_shuffle_moves_high_bits ... ok [ 25s] test random_state::test::test_not_pi ... ok [ 25s] test random_state::test::test_unique ... ok [ 25s] test specialize::test::test_input_processed ... ok [ 25s] test random_state::test::test_with_seeds_const ... ok [ 25s] test specialize::test::test_ref_independent ... ok [ 25s] test test::test_ahash_alias_map_construction ... ok [ 25s] test test::test_ahash_alias_set_construction ... ok [ 25s] test test::test_ahasher_construction ... ok [ 25s] test hash_quality_test::fallback_tests::fallback_test_no_pair_collisions ... ok [ 25s] test test::test_conversion ... ok [ 25s] test test::test_default_builder ... ok [ 25s] test test::test_builder ... ok [ 25s] test test::test_non_zero ... ok [ 25s] test test::test_non_zero_specialized ... ok [ 25s] test hash_quality_test::fallback_tests::fallback_padding_doesnot_collide ... ok [ 58s] test hash_quality_test::fallback_tests::fallback_test_no_full_collisions ... ok [ 58s] [ 58s] test result: ok. 31 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 33.40s
-rw-r--r--packaging/rust-ahash.spec19
1 files changed, 19 insertions, 0 deletions
diff --git a/packaging/rust-ahash.spec b/packaging/rust-ahash.spec
index b68bbf8..a22a9b1 100644
--- a/packaging/rust-ahash.spec
+++ b/packaging/rust-ahash.spec
@@ -33,6 +33,10 @@ BuildRequires: rust-version_check
Requires: rust-getrandom
Requires: rust-once_cell
+%if 0%{?run_tests}
+BuildRequires: rust-hex
+%endif
+
%description
Non-cryptographic hash function using AES-NI for high performance.
@@ -62,6 +66,21 @@ cp %{SOURCE1} .
install -d -m 0755 %{buildroot}%{_rust_dylibdir}
install -m 0644 lib%{real_crate_name}.so %{buildroot}/%{_rust_dylibdir}/lib%{real_crate_name}.so
+%check
+%if 0%{?run_tests}
+%{rustc_std_build} --test --crate-type=dylib \
+ --crate-name=%{real_crate_name} \
+ %{?rustc_edition:--edition=%{rustc_edition}} \
+ --cfg='feature="std"' \
+ --cfg='feature="runtime-rng"' \
+ --cfg='feature="atomic-polyfill"' \
+ %rust_dylib_extern cfg_if \
+ %rust_dylib_extern hex \
+ ./src/lib.rs
+
+./%{real_crate_name}
+%endif
+
%clean
%post -p /sbin/ldconfig