summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2023-05-23 11:21:22 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2023-05-23 11:21:22 +0900
commitfdb5b548b7c4356eec1ac46371828810790ffe16 (patch)
tree6afe8f8102f2a53fff55047db41aedef7f61c8d8
parent54660a8f584613960184f904ffb20faff62e2662 (diff)
downloadrust-dissimilar-tizen.tar.gz
rust-dissimilar-tizen.tar.bz2
rust-dissimilar-tizen.zip
[ 31s] + ./dissimilar [ 31s] [ 31s] running 8 tests [ 31s] test tests::test_bisect ... ok [ 31s] test tests::test_cleanup_merge ... ok [ 31s] test tests::test_common_overlap ... ok [ 31s] test tests::test_cleanup_semantic_lossless ... ok [ 31s] test tests::test_common_prefix ... ok [ 31s] test tests::test_cleanup_semantic ... ok [ 31s] test tests::test_common_suffix ... ok [ 31s] test tests::test_main ... ok [ 31s] [ 31s] test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s
-rw-r--r--packaging/rust-dissimilar.spec15
1 files changed, 14 insertions, 1 deletions
diff --git a/packaging/rust-dissimilar.spec b/packaging/rust-dissimilar.spec
index bf87e6f..febb431 100644
--- a/packaging/rust-dissimilar.spec
+++ b/packaging/rust-dissimilar.spec
@@ -25,7 +25,9 @@ BuildRequires: rust
# ==========================================================
# dev-dependencies
# ==========================================================
-# BuildRequires: rust-once_cell
+%if 0%{?run_tests}
+BuildRequires: rust-once_cell
+%endif
%description
@@ -52,6 +54,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}} \
+ %rust_dylib_extern once_cell \
+ ./src/lib.rs
+
+./%{real_crate_name}
+%endif
+
%clean
%post -p /sbin/ldconfig