summaryrefslogtreecommitdiff
path: root/audio/effect/all-versions/vts/functional/VtsHalAudioEffectTargetTest.cpp
diff options
context:
space:
mode:
authorMikhail Naganov <mnaganov@google.com>2022-08-05 00:24:27 +0000
committerMikhail Naganov <mnaganov@google.com>2022-08-05 00:30:59 +0000
commit978a0f9ea0733227ca9a2ed3b66270424a19f5a8 (patch)
tree758d378c82d56200639cd563faa7dc8e29716331 /audio/effect/all-versions/vts/functional/VtsHalAudioEffectTargetTest.cpp
parent808ba0f8a97c9eef81c885092060bcde920b6e50 (diff)
audio: Restrict the new VTS test for effects to T+
The VTS test AudioEffectHidlTest#GetParameterInvalidMaxReplySize should only run for new devices launching on T+ because older vendor images do not have updated HAL default wrapper code and thus will fail. Bug: 237291425 Bug: 240932876 Test: atest VtsHalAudioEffectV7_0TargetTest:Equalizer_IEffect/AudioEffectHidlTest#GetParameterInvalidMaxReplySize/0_default Change-Id: I1697155fe7781cbc96c1913e674699e299aa26b3
Diffstat (limited to 'audio/effect/all-versions/vts/functional/VtsHalAudioEffectTargetTest.cpp')
-rw-r--r--audio/effect/all-versions/vts/functional/VtsHalAudioEffectTargetTest.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/audio/effect/all-versions/vts/functional/VtsHalAudioEffectTargetTest.cpp b/audio/effect/all-versions/vts/functional/VtsHalAudioEffectTargetTest.cpp
index ffa4c56e7a..c808ff6cc2 100644
--- a/audio/effect/all-versions/vts/functional/VtsHalAudioEffectTargetTest.cpp
+++ b/audio/effect/all-versions/vts/functional/VtsHalAudioEffectTargetTest.cpp
@@ -35,6 +35,7 @@
#include <common/all-versions/VersionUtils.h>
+#include <cutils/properties.h>
#include <gtest/gtest.h>
#include <hidl/GtestPrinter.h>
#include <hidl/ServiceManagement.h>
@@ -625,6 +626,10 @@ TEST_P(AudioEffectHidlTest, GetParameter) {
TEST_P(AudioEffectHidlTest, GetParameterInvalidMaxReplySize) {
description("Verify that GetParameter caps the maximum reply size");
+ const bool isNewDeviceLaunchingOnTPlus = property_get_int32("ro.vendor.api_level", 0) >= 33;
+ if (!isNewDeviceLaunchingOnTPlus) {
+ GTEST_SKIP() << "The test only applies to devices launching on T or later";
+ }
// Use a non-empty parameter to avoid being rejected by any earlier checks.
hidl_vec<uint8_t> parameter;
parameter.resize(16);