diff options
Diffstat (limited to 'packaging')
-rw-r--r-- | packaging/rust-shlex.spec | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/packaging/rust-shlex.spec b/packaging/rust-shlex.spec index 3438e33..90e1d89 100644 --- a/packaging/rust-shlex.spec +++ b/packaging/rust-shlex.spec @@ -49,6 +49,18 @@ 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}} \ + --cfg='feature="std"' \ + ./src/lib.rs + +./%{real_crate_name} +%endif + + %clean %post -p /sbin/ldconfig |