summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2023-04-13 16:01:27 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2023-04-13 16:01:27 +0900
commita86337b5b37e7cd121617414c61203f0bd43e96d (patch)
treec4d37cba00023d5a4b3d64b47c5d6c801702fe9f
parenta0af3bf8336f3f73379fa63c940e22ace97072be (diff)
downloadrust-anstyle-accepted/tizen_rust.tar.gz
rust-anstyle-accepted/tizen_rust.tar.bz2
rust-anstyle-accepted/tizen_rust.zip
[ 12s] running 1 test [ 12s] test color::test::max_display_buffer ... ok [ 12s] [ 12s] test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
-rw-r--r--packaging/rust-anstyle.spec11
1 files changed, 11 insertions, 0 deletions
diff --git a/packaging/rust-anstyle.spec b/packaging/rust-anstyle.spec
index ca12886..b20ebfc 100644
--- a/packaging/rust-anstyle.spec
+++ b/packaging/rust-anstyle.spec
@@ -53,6 +53,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}} \
+ --cfg='feature="std"' \
+ ./src/lib.rs
+
+./%{real_crate_name}
+%endif
+
%clean
%post -p /sbin/ldconfig