Audio HAL: Align V2 and V4 VTS
It was thought that the V2 VTS were not going to be supported after V4
VTS were created. Thus a large portion of the code was copy paste and
modified.
That assumption ended up wrong as a lot of OEM reported bugs that needed
to be fixed in both versions.
As a result align the code of both version VTS as much as possible.
The code will be merged in a follow up patch.
Bug: 118203066
Test: compile
Change-Id: I994232db237b5d7c52e7d796f199ab3c6eec21f4
Signed-off-by: Kevin Rocard <krocard@google.com>
diff --git a/audio/effect/2.0/vts/functional/ValidateAudioEffectsConfiguration.cpp b/audio/effect/2.0/vts/functional/ValidateAudioEffectsConfiguration.cpp
index bf080d3..040c93f 100644
--- a/audio/effect/2.0/vts/functional/ValidateAudioEffectsConfiguration.cpp
+++ b/audio/effect/2.0/vts/functional/ValidateAudioEffectsConfiguration.cpp
@@ -21,12 +21,19 @@
#include "utility/ValidateXml.h"
+// Stringify the argument.
+#define QUOTE(x) #x
+#define STRINGIFY(x) QUOTE(x)
+
+#define AUDIO_HAL_VERSION V2_0
+
TEST(CheckConfig, audioEffectsConfigurationValidation) {
RecordProperty("description",
"Verify that the effects configuration file is valid according to the schema");
using namespace android::effectsConfig;
std::vector<const char*> locations(std::begin(DEFAULT_LOCATIONS), std::end(DEFAULT_LOCATIONS));
- EXPECT_VALID_XML_MULTIPLE_LOCATIONS(DEFAULT_NAME, locations,
- "/data/local/tmp/audio_effects_conf_V2_0.xsd");
+ const char* xsd = "/data/local/tmp/audio_effects_conf_" STRINGIFY(AUDIO_HAL_VERSION) ".xsd";
+ // In V2, audio effect XML is not required. .conf is still allowed though deprecated
+ EXPECT_VALID_XML_MULTIPLE_LOCATIONS(DEFAULT_NAME, locations, xsd);
}