summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2023-05-25 11:19:25 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2023-05-25 11:19:25 +0900
commit12e35d236536f2f89a54c444d78be327a24ee4e3 (patch)
tree2c579096e562a1be91f6687f79ec2d2588e41a81
parent9b6ed0c43fd1d13b2ea572090175d05ea1cc428d (diff)
downloadrust-fallible-iterator-accepted/tizen_rust.tar.gz
rust-fallible-iterator-accepted/tizen_rust.tar.bz2
rust-fallible-iterator-accepted/tizen_rust.zip
[ 29s] + ./fallible_iterator [ 29s] [ 29s] running 36 tests [ 29s] test test::all ... ok [ 29s] test test::any ... ok [ 29s] test test::chain ... ok [ 29s] test test::count ... ok [ 29s] test test::cycle ... ok [ 29s] test test::enumerate ... ok [ 29s] test test::filter_map ... ok [ 29s] test test::filter ... ok [ 29s] test test::find ... ok [ 29s] test test::find_map ... ok [ 29s] test test::flat_map ... ok [ 29s] test test::fold ... ok [ 29s] test test::for_each ... ok [ 29s] test test::inspect ... ok [ 29s] test test::iterator ... ok [ 29s] test test::flatten ... ok [ 29s] test test::last ... ok [ 29s] test test::map ... ok [ 29s] test test::map_err ... ok [ 29s] test test::max_by ... ok [ 29s] test test::max ... ok [ 29s] test test::max_by_key ... ok [ 29s] test test::min ... ok [ 29s] test test::min_by ... ok [ 29s] test test::nth ... ok [ 29s] test test::min_by_key ... ok [ 29s] test test::partition ... ok [ 29s] test test::peekable ... ok [ 29s] test test::position ... ok [ 29s] test test::scan ... ok [ 29s] test test::skip ... ok [ 29s] test test::skip_while ... ok [ 29s] test test::step_by ... ok [ 29s] test test::take ... ok [ 29s] test test::take_while ... ok [ 29s] test test::unzip ... ok [ 29s] [ 29s] test result: ok. 36 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.05s
-rw-r--r--packaging/rust-fallible-iterator.spec11
1 files changed, 11 insertions, 0 deletions
diff --git a/packaging/rust-fallible-iterator.spec b/packaging/rust-fallible-iterator.spec
index 779a708..8806be6 100644
--- a/packaging/rust-fallible-iterator.spec
+++ b/packaging/rust-fallible-iterator.spec
@@ -40,6 +40,7 @@ cp %{SOURCE1} .
%{rustc_std_build} --crate-type=dylib \
--crate-name=%{real_crate_name} \
%{?rustc_edition:--edition=%{rustc_edition}} \
+ --cfg='feature="std"' \
./src/lib.rs
# ==========================================================
@@ -49,6 +50,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}} \
+ --cfg='feature="std"' \
+ ./src/lib.rs
+
+./%{real_crate_name}
+%endif
%clean
%post -p /sbin/ldconfig