Subject: [bug#75980] [PATCH rust-team 102/106] gnu: rust-jack-0.8: Test.

From: Herman Rimm <[email-masked]>
Date: Fri, 31 Jan 2025 22:12:18 +0100

* gnu/packages/crates-audio.scm (rust-jack-0.8): Run some tests.  Move
rust-crossbeam-channel-0.5 to cargo-development-inputs.

Change-Id: If101f0cb44e8d3453eb96c4ffbcb96d72db37427
---
 gnu/packages/crates-audio.scm | 72 +++++++++++++++++++++++++++++++++--
 1 file changed, 69 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/crates-audio.scm b/gnu/packages/crates-audio.scm
index 692ded385dd..ac9b311021f 100644
--- a/gnu/packages/crates-audio.scm
+++ b/gnu/packages/crates-audio.scm
@@ -329,13 +329,79 @@ (define-public rust-jack-0.8
                (base32
                 "0lz10s0n2gy128m65pf96is9ip00vfgvnkfja0y9ydmv24pw2ajx"))))
     (arguments
-     (list #:tests? #f
+     (list #:cargo-test-flags
+           ;; Three of six doc-tests fail.
+           '(list "--lib" "--" "--exact"
+             ;; ClientError(FAILURE | SERVER_FAILED).
+             "--skip=client::test::client_can_activate"
+             "--skip=client::test::client_can_be_named"
+             "--skip=client::test::client_can_deactivate"
+             "--skip=client::test::client_can_estimate_frame_times"
+             "--skip=client::test::client_can_set_buffer_size"
+             "--skip=client::test::client_can_open"
+             "--skip=client::test::client_can_use_ringbuffer"
+             "--skip=client::test::client_debug_printing"
+             "--skip=client::test::client_detects_bad_buffer_size"
+             "--skip=client::test::client_knows_buffer_size"
+             "--skip=client::test::client_knows_cpu_load"
+             "--skip=client::test::client_knows_sample_rate"
+             "--skip=client::test::client_uuid"
+             "--skip=client::test_callback::client_cback_calls_after_client_registered"
+             "--skip=client::test_callback::client_cback_calls_after_client_unregistered"
+             "--skip=client::test_callback::client_cback_calls_buffer_size"
+             "--skip=client::test_callback::client_cback_calls_buffer_size_on_process_thread"
+             "--skip=client::test_callback::client_cback_calls_port_registered"
+             "--skip=client::test_callback::client_cback_calls_port_unregistered"
+             "--skip=client::test_callback::client_cback_calls_process"
+             "--skip=client::test_callback::client_cback_calls_thread_init"
+             "--skip=client::test_callback::client_cback_reports_xruns"
+             "--skip=port::audio::test::port_audio_can_read_write"
+             "--skip=port::midi::test::port_midi_can_get_max_event_size"
+             "--skip=port::midi::test::port_midi_can_read_write"
+             "--skip=port::midi::test::port_midi_cant_exceed_max_event_size"
+             "--skip=port::midi::test::port_midi_iter"
+             "--skip=port::midi::test::port_midi_iter_next_if"
+             "--skip=port::test_client::client_port_can_connect_ports"
+             "--skip=port::test_client::client_port_can_connect_ports_by_name"
+             "--skip=port::test_client::client_port_can_connect_unowned_ports"
+             "--skip=port::test_client::client_port_can_disconnect_port_from_all"
+             "--skip=port::test_client::client_port_can_disconnect_ports"
+             "--skip=port::test_client::client_port_can_disconnect_ports_by_name"
+             "--skip=port::test_client::client_port_can_disconnect_unowned_ports"
+             "--skip=port::test_client::client_port_can_get_existing_ports"
+             "--skip=port::test_client::client_port_can_get_port_by_id"
+             "--skip=port::test_client::client_port_can_get_port_by_name"
+             "--skip=port::test_client::client_port_can_get_port_by_name_pattern"
+             "--skip=port::test_client::client_port_can_get_port_by_type_pattern"
+             "--skip=port::test_client::client_port_can_register_port"
+             "--skip=port::test_client::client_port_can_request_monitor_by_name"
+             "--skip=port::test_client::client_port_cant_connect_inactive_client"
+             "--skip=port::test_client::client_port_fails_to_connect_nonexistant_ports"
+             "--skip=port::test_client::client_port_fails_to_nonexistant_port"
+             "--skip=port::test_client::client_port_recognizes_already_connected_ports"
+             "--skip=port::test_client::client_port_recognizes_my_ports"
+             "--skip=port::test_client::client_port_register_port_enforces_name_length"
+             "--skip=port::test_client::client_port_register_port_enforces_unique_names"
+             "--skip=port::test_port::port_can_be_cast_to_unowned"
+             "--skip=port::test_port::port_can_ensure_monitor"
+             "--skip=port::test_port::port_can_rename"
+             "--skip=port::test_port::port_can_request_monitor"
+             "--skip=port::test_port::port_can_set_alias"
+             "--skip=port::test_port::port_can_unset_alias"
+             "--skip=port::test_port::port_connected_count"
+             "--skip=port::test_port::port_created_with_proper_names"
+             "--skip=port::test_port::port_debug_printing"
+             "--skip=port::test_port::port_knows_connections"
+             ;; SIGSEGV: invalid memory reference
+             "--skip=test::time_can_get_time"
+             "--skip=test::time_is_monotonically_increasing")
            #:cargo-inputs `(("rust-bitflags" ,rust-bitflags-1)
                             ("rust-jack-sys" ,rust-jack-sys-0.2)
                             ("rust-lazy-static" ,rust-lazy-static-1)
                             ("rust-libc" ,rust-libc-0.2)
-                            ("rust-log" ,rust-log-0.4)
-                            ("rust-crossbeam-channel" ,rust-crossbeam-channel-0.5))))))
+                            ("rust-log" ,rust-log-0.4))
+           #:cargo-development-inputs
+           `(("rust-crossbeam-channel" ,rust-crossbeam-channel-0.5))))))
 
 (define-public rust-jack-sys-0.4
   (package
-- 
2.47.1