summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2023-04-14 10:52:33 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2023-04-17 07:55:32 +0900
commit39f69a2eeb957f7b621cd5376e29fb4dbe628684 (patch)
tree4e2a50b92f4ca5726f431fc08373d5f02baeeac5
parent8ec70d9d32555b2a58869086618a0fa74dcaf3e2 (diff)
downloadrust-async-channel-accepted/tizen/rust/20231016.020757.tar.gz
rust-async-channel-accepted/tizen/rust/20231016.020757.tar.bz2
rust-async-channel-accepted/tizen/rust/20231016.020757.zip
[ 46s] + ./bounded [ 46s] [ 46s] running 21 tests [ 46s] test capacity ... ok [ 46s] test len_empty_full ... ok [ 46s] test receiver_count ... ok [ 46s] test recv_after_close ... ok [ 46s] test len ... ok [ 46s] test send_after_close ... ok [ 46s] test sender_count ... ok [ 46s] test smoke ... ok [ 46s] test smoke_blocking ... ok [ 46s] test weak ... ok [ 46s] test spsc ... ok [ 46s] test mpmc ... ok [ 46s] test mpmc_stream ... ok [ 46s] test forget_blocked_receiver ... ok [ 46s] test forget_blocked_sender ... ok [ 47s] test close_wakes_sender ... ok [ 47s] test close_wakes_receiver ... ok [ 48s] test try_recv ... ok [ 48s] test try_send ... ok [ 49s] test recv ... ok [ 49s] test send ... ok [ 49s] [ 49s] test result: ok. 21 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 3.57s [ 49s] [ 49s] + for unit_test in '"bounded"' '"unbounded"' [ 49s] + ./unbounded [ 50s] [ 50s] running 18 tests [ 50s] test capacity ... ok [ 50s] test len ... ok [ 50s] test len_empty_full ... ok [ 50s] test recv_after_close ... ok [ 50s] test receiver_count ... ok [ 50s] test send ... ok [ 50s] test send_after_close ... ok [ 50s] test sender_count ... ok [ 50s] test smoke ... ok [ 50s] test smoke_blocking ... ok [ 50s] test mpmc ... ok [ 50s] test mpmc_stream ... ok [ 50s] test try_send ... ok [ 50s] test weak ... ok [ 50s] test spsc ... ok [ 51s] test close_wakes_receiver ... ok [ 52s] test try_recv ... ok [ 53s] test recv ... ok [ 53s] [ 53s] test result: ok. 18 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 3.70s
-rw-r--r--packaging/rust-async-channel.spec26
1 files changed, 24 insertions, 2 deletions
diff --git a/packaging/rust-async-channel.spec b/packaging/rust-async-channel.spec
index 30bffb4..3d0db2c 100644
--- a/packaging/rust-async-channel.spec
+++ b/packaging/rust-async-channel.spec
@@ -31,8 +31,10 @@ Requires: rust-concurrent-queue
# ==========================================================
# dev-dependencies
# ==========================================================
-# BuildRequires: rust-easy-parallel
-# BuildRequires: rust-futures-lite
+%if 0%{?run_tests}
+BuildRequires: rust-easy-parallel
+BuildRequires: rust-futures-lite
+%endif
%description
@@ -60,6 +62,26 @@ 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}
+for unit_test in "bounded" "unbounded"
+do
+%{rustc_std_build} --test --crate-type=dylib \
+ --crate-name=${unit_test} \
+ %{?rustc_edition:--edition=%{rustc_edition}} \
+ --extern %{real_crate_name}=./lib%{real_crate_name}.so \
+ %rust_dylib_extern easy_parallel \
+ %rust_dylib_extern futures_lite \
+ ./tests/${unit_test}.rs
+done
+
+for unit_test in "bounded" "unbounded"
+do
+./${unit_test}
+done
+
+%endif
+
%clean
%post -p /sbin/ldconfig