Add unittest accepted/tizen_9.0_unified accepted/tizen_rust accepted/tizen_unified accepted/tizen_unified_dev accepted/tizen_unified_x tizen tizen_9.0 accepted/tizen/9.0/unified/20241030.233807 accepted/tizen/rust/20231016.020736 accepted/tizen/unified/20240328.121600 accepted/tizen/unified/dev/20240620.001036 accepted/tizen/unified/x/20240328.130527 tizen_9.0_m2_release
authorDongHun Kwak <dh0128.kwak@samsung.com>
Thu, 13 Apr 2023 06:56:33 +0000 (15:56 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Thu, 13 Apr 2023 06:56:33 +0000 (15:56 +0900)
[   93s] running 78 tests
[   93s] test ahocorasick::tests::oibits ... ok
[   93s] test classes::tests::byte_classes ... ok
[   93s] test classes::tests::full_byte_classes ... ok
[   93s] test nfa::tests::scratch ... ok
[   93s] test prefilter::tests::scratch ... ok
[   93s] test packed::tests::search_tests_have_unique_names ... ok
[   93s] test tests::acasei_leftmost_first_nfa_default ... ok
[   93s] test tests::acasei_leftmost_longest_dfa_default ... ok
[   93s] test tests::acasei_leftmost_longest_nfa_default ... ok
[   93s] test tests::acasei_leftmost_first_dfa_default ... ok
[   93s] test tests::acasei_standard_dfa_default ... ok
[   93s] test tests::acasei_standard_nfa_default ... ok
[   93s] test tests::acasei_standard_overlapping_dfa_default ... ok
[   93s] test tests::acasei_standard_overlapping_nfa_default ... ok
[   93s] test tests::overlapping_not_allowed_leftmost_longest - should panic ... ok
[   93s] test tests::overlapping_not_allowed_leftmost_first - should panic ... ok
[   93s] test tests::regression_ascii_case_insensitive_no_exponential ... ok
[   93s] test tests::regression_rare_byte_prefilter ... ok
[   93s] test tests::regression_stream_rare_byte_prefilter ... ok
[   93s] test tests::search_leftmost_first::dfa_all_dense ... ok
[   93s] test tests::search_leftmost_first::dfa_default ... ok
[   93s] test tests::regression_case_insensitive_prefilter ... ok
[   93s] test tests::search_leftmost_first::dfa_no_premultiply ... ok
[   93s] test tests::search_leftmost_first::dfa_no_prefilter ... ok
[   93s] test tests::search_leftmost_first::nfa_all_dense ... ok
[   93s] test tests::search_leftmost_first::dfa_all_sparse ... ok
[   93s] test tests::search_leftmost_first::dfa_no_byte_class ... ok
[   93s] test tests::search_leftmost_first::dfa_no_byte_class_no_premultiply ... ok
[   93s] test tests::search_leftmost_first::nfa_no_prefilter ... ok
[   93s] test tests::search_leftmost_first::nfa_default ... ok
[   93s] test tests::search_leftmost_first_anchored_dfa_default ... ok
[   93s] test tests::search_leftmost_first_anchored_nfa_default ... ok
[   93s] test tests::search_leftmost_longest::dfa_all_dense ... ok
[   93s] test tests::search_leftmost_first::nfa_all_sparse ... ok
[   93s] test tests::search_leftmost_longest::dfa_default ... ok
[   93s] test tests::search_leftmost_longest::dfa_no_prefilter ... ok
[   93s] test tests::search_leftmost_longest::dfa_no_byte_class ... ok
[   93s] test tests::search_leftmost_longest::dfa_all_sparse ... ok
[   93s] test tests::search_leftmost_longest::nfa_all_dense ... ok
[   93s] test tests::search_leftmost_longest::nfa_no_prefilter ... ok
[   93s] test tests::search_leftmost_longest_anchored_dfa_default ... ok
[   93s] test tests::search_leftmost_longest::nfa_default ... ok
[   93s] test tests::search_standard_anchored_dfa_default ... ok
[   93s] test tests::search_leftmost_longest::dfa_no_premultiply ... ok
[   93s] test tests::search_leftmost_longest_anchored_nfa_default ... ok
[   93s] test tests::search_standard_anchored_nfa_default ... ok
[   93s] test tests::search_leftmost_longest::dfa_no_byte_class_no_premultiply ... ok
[   93s] test tests::search_standard_anchored_overlapping_dfa_default ... ok
[   93s] test tests::search_standard_anchored_overlapping_nfa_default ... ok
[   93s] test tests::search_leftmost_longest::nfa_all_sparse ... ok
[   93s] test tests::search_standard_nonoverlapping::dfa_all_dense ... ok
[   93s] test tests::search_standard_nonoverlapping::dfa_default ... ok
[   93s] test tests::search_standard_nonoverlapping::dfa_all_sparse ... ok
[   93s] test tests::search_standard_nonoverlapping::dfa_no_byte_class ... ok
[   93s] test tests::search_standard_nonoverlapping::dfa_no_prefilter ... ok
[   93s] test tests::search_standard_nonoverlapping::dfa_no_byte_class_no_premultiply ... ok
[   93s] test tests::search_standard_nonoverlapping::dfa_no_premultiply ... ok
[   93s] test tests::search_standard_nonoverlapping::nfa_all_dense ... ok
[   93s] test tests::search_standard_nonoverlapping::nfa_no_prefilter ... ok
[   93s] test tests::search_standard_nonoverlapping::nfa_all_sparse ... ok
[   93s] test tests::search_standard_overlapping_dfa_all_sparse ... ok
[   93s] test tests::search_standard_overlapping_dfa_all_dense ... ok
[   93s] test tests::search_standard_nonoverlapping::nfa_default ... ok
[   93s] test tests::search_standard_overlapping_dfa_no_premultiply ... ok
[   93s] test tests::search_standard_overlapping_nfa_all_dense ... ok
[   93s] test tests::search_tests_have_unique_names ... ok
[   93s] test tests::stream_not_allowed_leftmost_first - should panic ... ok
[   93s] test tests::search_standard_overlapping_dfa_default ... ok
[   93s] test tests::search_standard_overlapping_nfa_default ... ok
[   93s] test tests::stream_not_allowed_leftmost_longest - should panic ... ok
[   93s] test tests::search_standard_stream_dfa_default ... ok
[   93s] test tests::search_standard_stream_nfa_default ... ok
[   93s] test tests::search_standard_overlapping_dfa_no_byte_class_no_premultiply ... ok
[   93s] test tests::search_standard_overlapping_dfa_no_byte_class ... ok
[   93s] test tests::search_standard_overlapping_nfa_all_sparse ... ok
[   93s] test tests::state_id_too_small ... ok
[   93s] test packed::tests::search_rabinkarp_leftmost_first ... ok
[   93s] test packed::tests::search_rabinkarp_leftmost_longest ... ok
[   93s]
[   93s] test result: ok. 78 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.49s

packaging/rust-aho-corasick.spec

index fc6e778..ff5cf32 100644 (file)
@@ -23,6 +23,7 @@ Source2:        extern.patch
 # ==========================================================
 BuildRequires:  rust
 BuildRequires:  rust-memchr
+
 Requires:  rust-memchr
 
 %description
@@ -52,6 +53,18 @@ 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"' \
+        --extern memchr=%{_rust_dylibdir}/libmemchr.so \
+        ./src/lib.rs
+
+./%{real_crate_name}
+%endif
+
 %clean
 
 %post -p /sbin/ldconfig