summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author김명운/Tizen Platform Lab(SR)/삼성전자 <myoungwoon.kim@samsung.com>2023-05-11 15:50:21 +0900
committerGitHub Enterprise <noreply-CODE@samsung.com>2023-05-11 15:50:21 +0900
commit286e8a61f883a2a135f148bf6912b8a4226aa549 (patch)
tree1d17e024717538e52651d7c3a577be7838d357f6
parente4ffaa7a3b005b0ff1f576a020275b240ed1e7e5 (diff)
parent5327e53d8bcd4f99547cc0716943598546bedd68 (diff)
downloadrust-smallvec-tizen_9.0.tar.gz
rust-smallvec-tizen_9.0.tar.bz2
rust-smallvec-tizen_9.0.zip
Add unittest
-rw-r--r--packaging/rust-smallvec.spec11
1 files changed, 11 insertions, 0 deletions
diff --git a/packaging/rust-smallvec.spec b/packaging/rust-smallvec.spec
index 92ccd17..820395d 100644
--- a/packaging/rust-smallvec.spec
+++ b/packaging/rust-smallvec.spec
@@ -51,6 +51,17 @@ 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} \
+ -larbitrary \
+ -lserde \
+ ./src/lib.rs
+
+./%{real_crate_name}
+%endif
+
%clean
%post -p /sbin/ldconfig