diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2023-04-21 10:17:55 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2023-04-21 10:17:55 +0900 |
commit | 50c3c65a99cc6a41c85dfb4aaf694aa0fca9cf87 (patch) | |
tree | 4465a4c2457ad704eea1f8417798b0f5735e4fd0 | |
parent | 9422fe4cd2e0d440b6c288444094f11c1862eba8 (diff) | |
download | rust-base64-accepted/tizen_rust.tar.gz rust-base64-accepted/tizen_rust.tar.bz2 rust-base64-accepted/tizen_rust.zip |
[ 68s] + ./base64
[ 68s]
[ 68s] running 140 tests
[ 68s] test alphabet::tests::detects_duplicate_end ... ok
[ 68s] test alphabet::tests::detects_duplicate_middle ... ok
[ 68s] test alphabet::tests::detects_duplicate_start ... ok
[ 68s] test alphabet::tests::detects_length ... ok
[ 68s] test alphabet::tests::detects_padding ... ok
[ 68s] test alphabet::tests::detects_unprintable ... ok
[ 68s] test chunked_encoder::tests::chunked_encode_empty ... ok
[ 68s] test alphabet::tests::same_as_unchecked ... ok
[ 68s] test chunked_encoder::tests::chunked_encode_intermediate_fast_loop ... ok
[ 68s] test chunked_encoder::tests::chunked_encode_fast_loop ... ok
[ 68s] test chunked_encoder::tests::chunked_encode_slow_loop_only ... ok
[ 68s] test chunked_encoder::tests::max_input_length_cant_use_extra_single_encoded_byte ... ok
[ 68s] test chunked_encoder::tests::max_input_length_no_pad ... ok
[ 68s] test chunked_encoder::tests::max_input_length_with_pad_fits_exactly ... ok
[ 68s] test chunked_encoder::tests::max_input_length_with_pad_decrements_one_triple ... ok
[ 68s] test chunked_encoder::tests::max_input_length_with_pad_one_byte_short ... ok
[ 68s] test decode::tests::decode_engine_estimation_works_for_various_lengths ... ok
[ 68s] test decode::tests::decode_slice_output_length_errors ... ok
[ 68s] test display::tests::basic_display ... ok
[ 68s] test encode::tests::add_padding_random_valid_utf8 ... ok
[ 68s] test encode::tests::encode_imap ... ok
[ 68s] test encode::tests::encoded_size_correct_no_pad ... ok
[ 68s] test encode::tests::encoded_size_correct_standard ... ok
[ 68s] test encode::tests::encoded_size_overflow ... ok
[ 68s] test engine::general_purpose::decode::tests::decode_chunk_precise_writes_only_6_bytes ... ok
[ 68s] test engine::general_purpose::decode::tests::decode_chunk_writes_8_bytes ... ok
[ 68s] test engine::tests::decode_absurd_pad_error::case_1_general_purpose ... ok
[ 68s] test engine::tests::decode_absurd_pad_error::case_2_naive ... ok
[ 68s] test engine::tests::decode_bytes_after_padding_in_final_quad_error::case_1_general_purpose ... ok
[ 68s] test engine::tests::decode_bytes_after_padding_in_final_quad_error::case_2_naive ... ok
[ 68s] test engine::tests::decode_detect_invalid_last_symbol::case_1_general_purpose ... ok
[ 68s] test engine::tests::decode_detect_invalid_last_symbol_when_length_is_also_invalid::case_1_general_purpose ... ok
[ 68s] test engine::tests::decode_detect_invalid_last_symbol::case_2_naive ... ok
[ 68s] test engine::tests::decode_detect_invalid_last_symbol_when_length_is_also_invalid::case_2_naive ... ok
[ 68s] test encode::tests::encode_to_slice_random_valid_utf8 ... ok
[ 68s] test engine::tests::decode_into_slice_fits_in_precisely_sized_slice::case_1_general_purpose ... ok
[ 68s] test encode::tests::encode_with_padding_random_valid_utf8 ... ok
[ 68s] test decode::tests::decode_into_nonempty_vec_doesnt_clobber_existing_prefix ... ok
[ 68s] test engine::tests::decode_invalid_trailing_bits_ignored_when_configured::case_1_general_purpose ... ok
[ 68s] test engine::tests::decode_invalid_trailing_bits_ignored_when_configured::case_2_naive ... ok
[ 68s] test engine::tests::decode_invalid_trailing_bytes::case_1_general_purpose ... ok
[ 68s] test engine::tests::decode_invalid_trailing_bytes::case_2_naive ... ok
[ 68s] test engine::tests::decode_length_estimate_delta::case_1_general_purpose ... ok
[ 68s] test engine::tests::decode_length_estimate_delta::case_2_naive ... ok
[ 68s] test engine::tests::decode_malleability_test_case_2_byte_suffix_no_padding::case_1_general_purpose ... ok
[ 68s] test engine::tests::decode_malleability_test_case_2_byte_suffix_no_padding::case_2_naive ... ok
[ 68s] test engine::tests::decode_malleability_test_case_2_byte_suffix_short_padding::case_1_general_purpose ... ok
[ 68s] test engine::tests::decode_malleability_test_case_2_byte_suffix_short_padding::case_2_naive ... ok
[ 68s] test engine::tests::decode_malleability_test_case_2_byte_suffix_too_much_padding::case_1_general_purpose ... ok
[ 68s] test engine::tests::decode_malleability_test_case_2_byte_suffix_too_much_padding::case_2_naive ... ok
[ 68s] test engine::tests::decode_malleability_test_case_2_byte_suffix_valid_two_padding_symbols::case_1_general_purpose ... ok
[ 68s] test engine::tests::decode_malleability_test_case_2_byte_suffix_valid_two_padding_symbols::case_2_naive ... ok
[ 68s] test encode::tests::encode_engine_string_into_nonempty_buffer_doesnt_clobber_prefix ... ok
[ 68s] test engine::tests::decode_malleability_test_case_3_byte_suffix_invalid_trailing_symbol::case_1_general_purpose ... ok
[ 68s] test engine::tests::decode_malleability_test_case_3_byte_suffix_invalid_trailing_symbol::case_2_naive ... ok
[ 68s] test engine::tests::decode_malleability_test_case_3_byte_suffix_no_padding::case_1_general_purpose ... ok
[ 68s] test engine::tests::decode_invalid_byte_error::case_1_general_purpose ... ok
[ 68s] test engine::tests::decode_malleability_test_case_3_byte_suffix_no_padding::case_2_naive ... ok
[ 68s] test engine::tests::decode_into_slice_fits_in_precisely_sized_slice::case_2_naive ... ok
[ 68s] test engine::tests::decode_malleability_test_case_3_byte_suffix_valid::case_2_naive ... ok
[ 68s] test engine::tests::decode_malleability_test_case_3_byte_suffix_valid::case_1_general_purpose ... ok
[ 68s] test engine::tests::decode_one_char_in_final_quad_with_padding_error::case_1_general_purpose ... ok
[ 68s] test engine::tests::decode_one_char_in_final_quad_with_padding_error::case_2_naive ... ok
[ 68s] test engine::tests::decode_pad_mode_indifferent_padding_accepts_anything::case_1_general_purpose ... ok
[ 68s] test engine::tests::decode_pad_mode_indifferent_padding_accepts_anything::case_2_naive ... ok
[ 68s] test engine::tests::decode_pad_mode_requires_canonical_accepts_canonical::case_1_general_purpose ... ok
[ 68s] test engine::tests::decode_pad_mode_requires_canonical_accepts_canonical::case_2_naive ... ok
[ 68s] test engine::tests::decode_invalid_byte_error::case_2_naive ... ok
[ 68s] test engine::tests::decode_pad_mode_requires_canonical_rejects_non_canonical::case_1_general_purpose ... ok
[ 68s] test engine::tests::decode_pad_mode_requires_canonical_rejects_non_canonical::case_2_naive ... ok
[ 68s] test engine::tests::decode_pad_mode_requires_no_padding_accepts_no_padding::case_1_general_purpose ... ok
[ 68s] test engine::tests::decode_pad_mode_requires_no_padding_accepts_no_padding::case_2_naive ... ok
[ 68s] test engine::tests::decode_pad_mode_requires_no_padding_rejects_any_padding::case_1_general_purpose ... ok
[ 68s] test engine::tests::decode_pad_mode_requires_no_padding_rejects_any_padding::case_2_naive ... ok
[ 68s] test engine::tests::decode_pad_byte_in_penultimate_quad_error::case_1_general_purpose ... ok
[ 68s] test engine::tests::decode_pad_byte_in_penultimate_quad_error::case_2_naive ... ok
[ 69s] test engine::tests::decode_doesnt_write_extra_bytes::case_1_general_purpose ... ok
[ 69s] test chunked_encoder::tests::chunked_encode_matches_normal_encode_random_string_sink ... ok
[ 69s] test display::tests::display_encode_matches_normal_encode ... ok
[ 69s] test engine::tests::decode_doesnt_write_extra_bytes::case_2_naive ... ok
[ 69s] test engine::tests::decode_too_few_symbols_in_final_quad_error::case_1_general_purpose ... ok
[ 69s] test engine::tests::decode_padding_followed_by_non_padding_returns_error::case_1_general_purpose ... ok
[ 69s] test engine::tests::decode_padding_followed_by_non_padding_returns_error::case_2_naive ... ok
[ 69s] test engine::tests::decode_too_few_symbols_in_final_quad_error::case_2_naive ... ok
[ 69s] test engine::tests::decode_wrong_length_error::case_1_general_purpose ... ok
[ 69s] test engine::tests::decode_wrong_length_error::case_2_naive ... ok
[ 69s] test encode::tests::encode_engine_slice_into_nonempty_buffer_doesnt_clobber_suffix ... ok
[ 69s] test decode::tests::decode_slice_unchecked_doesnt_clobber_existing_prefix_or_suffix ... ok
[ 69s] test decode::tests::decode_slice_doesnt_clobber_existing_prefix_or_suffix ... ok
[ 69s] test engine::tests::decode_too_much_padding_returns_error::case_1_general_purpose ... ok
[ 69s] test engine::tests::rfc_test_vectors_std_alphabet::case_1_general_purpose ... ok
[ 69s] test engine::tests::encode_engine_slice_fits_into_precisely_sized_slice::case_1_general_purpose ... ok
[ 69s] test engine::tests::rfc_test_vectors_std_alphabet::case_2_naive ... ok
[ 69s] test engine::tests::encode_engine_slice_fits_into_precisely_sized_slice::case_2_naive ... ok
[ 69s] test engine::tests::decode_too_much_padding_returns_error::case_2_naive ... ok
[ 69s] test engine::tests::roundtrip_random::case_1_general_purpose ... ok
[ 69s] test engine::tests::roundtrip_random::case_2_naive ... ok
[ 69s] test engine::tests::encode_doesnt_write_extra_bytes::case_1_general_purpose ... ok
[ 69s] test engine::tests::encode_doesnt_write_extra_bytes::case_2_naive ... ok
[ 69s] test read::decoder_tests::simple ... ok
[ 69s] test read::decoder_tests::trailing_junk ... ok
[ 69s] test engine::tests::decode_detect_invalid_last_symbol_every_possible_two_symbols::case_1_general_purpose ... ok
[ 69s] test engine::tests::decode_detect_invalid_last_symbol_every_possible_two_symbols::case_2_naive ... ok
[ 69s] test tests::roundtrip_random_config_short ... ok
[ 69s] test write::encoder_tests::drop_calls_finish_for_you ... ok
[ 69s] test write::encoder_tests::encode_1_2_3_bytes ... ok
[ 69s] test write::encoder_tests::encode_nine_bytes_two_writes ... ok
[ 69s] test write::encoder_tests::encode_one_then_five_bytes ... ok
[ 69s] test write::encoder_tests::encode_one_then_two_bytes ... ok
[ 69s] test tests::roundtrip_random_config_long ... ok
[ 69s] test engine::tests::decode_padding_starts_before_final_chunk_error_invalid_byte::case_1_general_purpose ... ok
[ 69s] test write::encoder_tests::encode_three_bytes ... ok
[ 69s] test write::encoder_tests::encode_with_padding ... ok
[ 69s] test write::encoder_tests::encode_with_padding_multiple_writes ... ok
[ 70s] test write::encoder_tests::encode_random_config_matches_normal_encode_reasonable_input_len ... ok
[ 70s] test write::encoder_tests::finish_writes_extra_byte ... ok
[ 70s] test engine::tests::decode_padding_starts_before_final_chunk_error_invalid_byte::case_2_naive ... ok
[ 70s] test write::encoder_tests::write_1_chunk_and_partial_encodes_only_complete_chunk ... ok
[ 70s] test write::encoder_tests::write_1_chunk_encodes_complete_chunk ... ok
[ 70s] test write::encoder_tests::write_2_partials_to_exactly_complete_chunk_encodes_complete_chunk ... ok
[ 70s] test write::encoder_tests::write_partial_chunk_encodes_partial_chunk ... ok
[ 70s] test write::encoder_tests::write_partial_then_enough_to_complete_chunk_and_another_chunk_and_another_partial_chunk_encodes_only_complete_chunks ... ok
[ 70s] test write::encoder_tests::write_partial_then_enough_to_complete_chunk_and_another_chunk_encodes_complete_chunks ... ok
[ 70s] test write::encoder_tests::write_partial_then_enough_to_complete_chunk_but_not_complete_another_chunk_encodes_complete_chunk_without_consuming_remaining ... ok
[ 70s] test read::decoder_tests::read_in_short_increments ... ok
[ 70s] test read::decoder_tests::reports_invalid_byte_correctly ... ok
[ 70s] test write::encoder_string_writer::tests::every_possible_split_of_input ... ok
[ 71s] test write::encoder_tests::encode_random_config_matches_normal_encode_tiny_input_len ... ok
[ 71s] test write::encoder_tests::every_possible_split_of_input ... ok
[ 71s] test engine::tests::decode_padding_before_final_non_padding_char_error_invalid_byte::case_1_general_purpose ... ok
[ 72s] test engine::tests::decode_padding_before_final_non_padding_char_error_invalid_byte::case_2_naive ... ok
[ 72s] test engine::tests::decode_too_little_data_before_padding_error_invalid_byte::case_1_general_purpose ... ok
[ 73s] test read::decoder_tests::handles_short_read_from_delegate ... ok
[ 73s] test read::decoder_tests::reports_invalid_last_symbol_correctly ... ok
[ 73s] test read::decoder_tests::read_in_short_increments_with_short_delegate_reads ... ok
[ 73s] test engine::tests::decode_too_little_data_before_padding_error_invalid_byte::case_2_naive ... ok
[ 77s] test write::encoder_tests::retrying_writes_that_error_with_interrupted_works ... ok
[ 85s] test write::encoder_tests::writes_that_only_write_part_of_input_and_sometimes_interrupt_produce_correct_encoded_data ... ok
[ 128s] test engine::tests::decode_detect_invalid_last_symbol_every_possible_three_symbols::case_1_general_purpose has been running for over 60 seconds
[ 128s] test engine::tests::decode_detect_invalid_last_symbol_every_possible_three_symbols::case_2_naive has been running for over 60 seconds
[ 130s] test engine::tests::decode_detect_invalid_last_symbol_every_possible_three_symbols::case_1_general_purpose ... ok
[ 134s] test engine::tests::decode_detect_invalid_last_symbol_every_possible_three_symbols::case_2_naive ... ok
[ 134s]
[ 134s] test result: ok. 140 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 65.98s
-rw-r--r-- | packaging/rust-base64.spec | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/packaging/rust-base64.spec b/packaging/rust-base64.spec index 53040c7..c45d948 100644 --- a/packaging/rust-base64.spec +++ b/packaging/rust-base64.spec @@ -25,11 +25,13 @@ BuildRequires: rust # ========================================================== # dev-dependencies # ========================================================== +%if 0%{?run_tests} +BuildRequires: rust-rand +BuildRequires: rust-rstest +BuildRequires: rust-rstest_reuse # BuildRequires: rust-criterion -# BuildRequires: rust-rand -# BuildRequires: rust-rstest -# BuildRequires: rust-rstest_reuse # BuildRequires: rust-structopt +%endif %description @@ -57,6 +59,20 @@ 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"' \ + %rust_dylib_extern rand \ + %rust_dylib_extern rstest \ + %rust_dylib_extern rstest_reuse \ + ./src/lib.rs + +./%{real_crate_name} +%endif + %clean %post -p /sbin/ldconfig |