summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author김명운/Tizen Platform Lab(SR)/삼성전자 <myoungwoon.kim@samsung.com>2023-05-12 09:30:39 +0900
committerGitHub Enterprise <noreply-CODE@samsung.com>2023-05-12 09:30:39 +0900
commit657e20c73fd54605b98123f50737b090289c3eea (patch)
treef6eea421067a2d94a629d9e13798f9ce0676238b
parentbcb8605b91c7d2d7fb1a24813addb80c1c5660cf (diff)
parent468579448adf515abd0b19627ccfc0e2df1e06b2 (diff)
downloadrust-signal-hook-registry-accepted/tizen_unified_dev.tar.gz
rust-signal-hook-registry-accepted/tizen_unified_dev.tar.bz2
rust-signal-hook-registry-accepted/tizen_unified_dev.zip
Add unittest
-rw-r--r--packaging/rust-signal-hook-registry.spec11
1 files changed, 11 insertions, 0 deletions
diff --git a/packaging/rust-signal-hook-registry.spec b/packaging/rust-signal-hook-registry.spec
index 3aaa49a..3129fa6 100644
--- a/packaging/rust-signal-hook-registry.spec
+++ b/packaging/rust-signal-hook-registry.spec
@@ -55,6 +55,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} \
+ %{?rustc_edition:--edition=%{rustc_edition}} \
+ --extern libc=%{_rust_dylibdir}/liblibc.so \
+ ./src/lib.rs
+
+./%{real_crate_name}
+%endif
+
%clean
%post -p /sbin/ldconfig