From 0e7f41d6ef4579901faac04662780d1855b6b2ff Mon Sep 17 00:00:00 2001 From: Paul Adenot Date: Tue, 25 Apr 2023 16:15:16 +0200 Subject: Don't run test_loopback and test_duplex on backends that can't open audio input --- test/test_loopback.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/test_loopback.cpp') diff --git a/test/test_loopback.cpp b/test/test_loopback.cpp index ce29d6e..e2c8343 100644 --- a/test/test_loopback.cpp +++ b/test/test_loopback.cpp @@ -267,6 +267,12 @@ void run_loopback_duplex_test(bool is_float) std::unique_ptr cleanup_cubeb_at_exit(ctx, cubeb_destroy); + /* This test needs an available input device, skip it if this host does not + * have one. */ + if (!can_run_audio_input_test(ctx)) { + return; + } + input_params.format = is_float ? CUBEB_SAMPLE_FLOAT32NE : CUBEB_SAMPLE_S16LE; input_params.rate = SAMPLE_FREQUENCY; input_params.channels = 1; -- cgit v1.2.3