diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2023-04-17 14:49:40 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2023-04-17 14:49:40 +0900 |
commit | 531f09879e4cc5bfeb0025dcc2de48e5277a8b42 (patch) | |
tree | f66f795d5551a4e11dc1102efae358082efa1390 | |
parent | 246647ff68132a2faf98390957f207647a098438 (diff) | |
download | rust-async-trait-tizen.tar.gz rust-async-trait-tizen.tar.bz2 rust-async-trait-tizen.zip |
[ 55s] + ./async_trait
[ 55s]
[ 55s] running 3 tests
[ 55s] test drop_order::test_drop_order ... ok
[ 55s] test issue199::test ... ok
[ 55s] test issue45::tracing ... ok
[ 55s]
[ 55s] test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
-rw-r--r-- | packaging/rust-async-trait.spec | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/packaging/rust-async-trait.spec b/packaging/rust-async-trait.spec index d22c8cf..f385c7d 100644 --- a/packaging/rust-async-trait.spec +++ b/packaging/rust-async-trait.spec @@ -32,11 +32,13 @@ Requires: rust-syn # ========================================================== # dev-dependencies # ========================================================== -# BuildRequires: rust-futures -# BuildRequires: rust-rustversion -# BuildRequires: rust-tracing +%if 0%{?run_tests} +BuildRequires: rust-tracing +BuildRequires: rust-rustversion +BuildRequires: rust-futures # BuildRequires: rust-tracing-attributes # BuildRequires: rust-trybuild +%endif %description @@ -64,6 +66,20 @@ 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-name=%{real_crate_name} \ + %{?rustc_edition:--edition=%{rustc_edition}} \ + --extern %{real_crate_name}=lib%{real_crate_name}.so \ + %rust_dylib_extern tracing \ + %rust_dylib_extern rustversion \ + %rust_dylib_extern futures \ + ./tests/test.rs + +./%{real_crate_name} +%endif + %clean %post -p /sbin/ldconfig |