Effect Aidl: skipping reopen test for unsupported audio hal
Bug: 327678656
Bug: 328009824
Test: atest VtsHalAudioEffectTargetTest
Change-Id: I25a27c780253f84f771148b5c30be57f35dbf39c
diff --git a/audio/aidl/vts/VtsHalAudioEffectTargetTest.cpp b/audio/aidl/vts/VtsHalAudioEffectTargetTest.cpp
index 5479825..4693f10 100644
--- a/audio/aidl/vts/VtsHalAudioEffectTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalAudioEffectTargetTest.cpp
@@ -42,6 +42,7 @@
using aidl::android::hardware::audio::effect::Flags;
using aidl::android::hardware::audio::effect::IEffect;
using aidl::android::hardware::audio::effect::IFactory;
+using aidl::android::hardware::audio::effect::kReopenSupportedVersion;
using aidl::android::hardware::audio::effect::Parameter;
using aidl::android::hardware::audio::effect::State;
using aidl::android::media::audio::common::AudioDeviceDescription;
@@ -613,6 +614,10 @@
* verify reopen sequence.
*/
TEST_P(AudioEffectDataPathTest, SetCommonParameterAndReopen) {
+ if (!EffectFactoryHelper::isReopenSupported(mFactory)) {
+ GTEST_SKIP() << "Skipping test as effect does not support reopen";
+ }
+
ASSERT_NO_FATAL_FAILURE(create(mFactory, mEffect, mDescriptor));
Parameter::Common common = EffectHelper::createParamCommon(
@@ -732,6 +737,10 @@
// Send data to effects and expect it to be consumed after effect reopen (IO AudioConfig change).
// Effects exposing bypass flags or operating in offload mode will be skipped.
TEST_P(AudioEffectDataPathTest, ConsumeDataAfterReopen) {
+ if (!EffectFactoryHelper::isReopenSupported(mFactory)) {
+ GTEST_SKIP() << "Skipping test as effect does not support reopen";
+ }
+
ASSERT_NO_FATAL_FAILURE(create(mFactory, mEffect, mDescriptor));
Parameter::Common common = EffectHelper::createParamCommon(