summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2023-05-23 14:23:30 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2023-05-23 14:23:30 +0900
commit07868dff90a56b1547f267aa0efd5406f13b7c4e (patch)
treee33b1b810104c89903905690ae79f62792ca3d26
parentd060cd771c3d64db052ae9bf6549249112157277 (diff)
downloadrust-easy-parallel-tizen.tar.gz
rust-easy-parallel-tizen.tar.bz2
rust-easy-parallel-tizen.zip
[ 23s] + ./easy_parallel [ 23s] [ 23s] running 3 tests [ 23s] test finish ... ok [ 23s] test squares ... ok [ 23s] test smoke ... ok [ 23s] [ 23s] test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s
-rw-r--r--packaging/rust-easy-parallel.spec10
1 files changed, 10 insertions, 0 deletions
diff --git a/packaging/rust-easy-parallel.spec b/packaging/rust-easy-parallel.spec
index 197cd7e..1780ef7 100644
--- a/packaging/rust-easy-parallel.spec
+++ b/packaging/rust-easy-parallel.spec
@@ -48,6 +48,16 @@ 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 %{real_crate_name}=./lib%{real_crate_name}.so \
+ ./tests/smoke.rs
+
+./%{real_crate_name}
+%endif
%clean
%post -p /sbin/ldconfig