diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2023-05-04 09:16:13 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2023-05-04 09:16:13 +0900 |
commit | 0bd66990857f8ed9059cd7c5440154dd81bd1478 (patch) | |
tree | d8a16b2c6d86d867c2478b4847654cb73bbc8179 | |
parent | a5f6d136810feb58542a97df55d47912d79fd98e (diff) | |
download | rust-ciborium-ll-accepted/tizen_rust.tar.gz rust-ciborium-ll-accepted/tizen_rust.tar.bz2 rust-ciborium-ll-accepted/tizen_rust.zip |
[ 14s] + ./ciborium_ll
[ 14s]
[ 14s] running 2 tests
[ 14s] test tests::node ... ok
[ 14s] test tests::leaf ... ok
[ 14s]
[ 14s] test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
-rw-r--r-- | packaging/rust-ciborium-ll.spec | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/packaging/rust-ciborium-ll.spec b/packaging/rust-ciborium-ll.spec index 4fb9a6b..e99ddca 100644 --- a/packaging/rust-ciborium-ll.spec +++ b/packaging/rust-ciborium-ll.spec @@ -30,7 +30,9 @@ Requires: rust-half # ========================================================== # dev-dependencies # ========================================================== -# BuildRequires: rust-hex +%if 0%{?run_tests} +BuildRequires: rust-hex +%endif %description @@ -62,6 +64,21 @@ cp %{SOURCE2} . 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}} \ + %rust_dylib_extern ciborium_io \ + %rust_dylib_extern half \ + %rust_dylib_extern hex \ + --cfg='feature="std"' \ + --cfg='feature="alloc"' \ + ./src/lib.rs + +./%{real_crate_name} +%endif + %clean %post -p /sbin/ldconfig |