summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author김명운/Tizen Platform Lab(SR)/삼성전자 <myoungwoon.kim@samsung.com>2023-05-12 09:30:31 +0900
committerGitHub Enterprise <noreply-CODE@samsung.com>2023-05-12 09:30:31 +0900
commit5c7f6bac54f0c09e0729632d08e742bb0d1f3069 (patch)
tree60875ee3e6ad1e8587ae35fc44c2b8edc687db8c
parentafbf71d888125ba158d33d00d2960a06821c573a (diff)
parent047bcb56e59531ac050677918b46073132eb26cf (diff)
downloadrust-shlex-tizen.tar.gz
rust-shlex-tizen.tar.bz2
rust-shlex-tizen.zip
Merge pull request #1 from myoungwoon-kim/devaccepted/tizen/rust/20231016.021919tizenaccepted/tizen_rust
Add unittest
-rw-r--r--packaging/rust-shlex.spec12
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