diff options
-rw-r--r-- | packaging/rust-easy-parallel.spec | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/packaging/rust-easy-parallel.spec b/packaging/rust-easy-parallel.spec index 197cd7e..1780ef7 100644 --- a/packaging/rust-easy-parallel.spec +++ b/packaging/rust-easy-parallel.spec @@ -48,6 +48,16 @@ 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}} \ + --extern %{real_crate_name}=./lib%{real_crate_name}.so \ + ./tests/smoke.rs + +./%{real_crate_name} +%endif %clean %post -p /sbin/ldconfig |