summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packaging/rust-document-features.spec12
1 files changed, 12 insertions, 0 deletions
diff --git a/packaging/rust-document-features.spec b/packaging/rust-document-features.spec
index f9ee662..3a7aa80 100644
--- a/packaging/rust-document-features.spec
+++ b/packaging/rust-document-features.spec
@@ -51,6 +51,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=proc-macro \
+ --crate-name=%{real_crate_name} \
+ --cfg='feature="default"' \
+ %{?rustc_edition:--edition=%{rustc_edition}} \
+ %rust_dylib_extern litrs \
+ ./lib.rs
+
+./%{real_crate_name}
+%endif
+
%clean
%post -p /sbin/ldconfig