diff options
-rw-r--r-- | packaging/rust-slog.spec | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/packaging/rust-slog.spec b/packaging/rust-slog.spec index c749a3e..bac1dc8 100644 --- a/packaging/rust-slog.spec +++ b/packaging/rust-slog.spec @@ -50,6 +50,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} + +export CARGO_PKG_VERSION=1.67.1 + +%{rustc_std_build} --test --crate-type=dylib \ + --crate-name=%{real_crate_name} \ + %{?rustc_edition:--edition=%{rustc_edition}} \ + --cfg='feature="std"' \ + ./src/lib.rs + +./%{real_crate_name} +%endif + %clean %post -p /sbin/ldconfig |