diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2023-06-09 09:59:27 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2023-06-09 09:59:27 +0900 |
commit | aaa8f8eae42578c3917f63617ae35088ce833b8c (patch) | |
tree | ccb8a9be5c324c5531decb1c3817cf533ca8723c | |
parent | 890cf4ab107e998f8de25bc0fcf7062c6903dc36 (diff) | |
download | rust-siphasher-accepted/tizen_rust.tar.gz rust-siphasher-accepted/tizen_rust.tar.bz2 rust-siphasher-accepted/tizen_rust.zip |
[ 20s] + ./siphasher
[ 20s]
[ 20s] running 10 tests
[ 20s] test tests128::test_siphash128_1_3 ... ok
[ 20s] test tests128::test_siphash128_2_4 ... ok
[ 20s] test tests128::test_siphash128_serde ... ok
[ 20s] test tests::test_hash_idempotent ... ok
[ 20s] test tests::test_hash_no_bytes_dropped_32 ... ok
[ 20s] test tests::test_hash_no_bytes_dropped_64 ... ok
[ 20s] test tests::test_hash_no_concat_alias ... ok
[ 20s] test tests::test_hash_serde ... ok
[ 20s] test tests::test_siphash_2_4 ... ok
[ 20s] test tests::test_siphash_1_3 ... ok
[ 20s]
[ 20s] test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s
-rw-r--r-- | packaging/rust-siphasher.spec | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/packaging/rust-siphasher.spec b/packaging/rust-siphasher.spec index a63ab58..4726b11 100644 --- a/packaging/rust-siphasher.spec +++ b/packaging/rust-siphasher.spec @@ -29,7 +29,9 @@ BuildRequires: rust-serde # ========================================================== # dev-dependencies # ========================================================== -# BuildRequires: rust-serde_json +%if 0%{?run_tests} +BuildRequires: rust-serde_json +%endif %description @@ -59,6 +61,18 @@ cp %{SOURCE3} . 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"' \ + %rust_dylib_extern serde_json \ + ./src/lib.rs + +./%{real_crate_name} +%endif + %clean %post -p /sbin/ldconfig |