summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2023-05-08 11:17:56 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2023-05-08 11:17:56 +0900
commitbf1cad36fdcdbfc09cf5f8b9f89f749b37fa8dbe (patch)
treee7b4c73fc23447583903bdff80175d912f94855a
parent666081c42bc52cc25b962b5e3e3ad144e5db730a (diff)
downloadrust-concolor-accepted/tizen_rust.tar.gz
rust-concolor-accepted/tizen_rust.tar.bz2
rust-concolor-accepted/tizen_rust.zip
[ 17s] + ./concolor [ 17s] [ 17s] running 0 tests [ 17s] [ 17s] test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
-rw-r--r--packaging/rust-concolor.spec11
1 files changed, 11 insertions, 0 deletions
diff --git a/packaging/rust-concolor.spec b/packaging/rust-concolor.spec
index 0db90ad..68519aa 100644
--- a/packaging/rust-concolor.spec
+++ b/packaging/rust-concolor.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