From 7449841dc56312ef54fbbec17a9d5547348d7478 Mon Sep 17 00:00:00 2001 From: Jaideep Sharma Date: Wed, 13 Sep 2023 15:25:25 +0530 Subject: [PATCH] audio: Add VTS execution tracer Add Execution listener in VTS tests to get information about test execution steps like, start, stop and failure messages in logcat message. Bug: 287168985 Test: run vts-hal-audio Change-Id: Ie69a7bf78076c17d7b623d75748fa0fdbdba6b1e --- audio/aidl/vts/Android.bp | 5 ++- audio/aidl/vts/TestUtils.cpp | 43 +++++++++++++++++++ audio/aidl/vts/TestUtils.h | 10 +++++ audio/aidl/vts/VtsHalAECTargetTest.cpp | 2 + audio/aidl/vts/VtsHalAGC1TargetTest.cpp | 2 + audio/aidl/vts/VtsHalAGC2TargetTest.cpp | 2 + .../vts/VtsHalAudioCoreModuleTargetTest.cpp | 16 +------ .../VtsHalAudioEffectFactoryTargetTest.cpp | 2 + .../aidl/vts/VtsHalAudioEffectTargetTest.cpp | 2 + audio/aidl/vts/VtsHalBassBoostTargetTest.cpp | 3 +- audio/aidl/vts/VtsHalDownmixTargetTest.cpp | 3 +- .../aidl/vts/VtsHalDynamicsProcessingTest.cpp | 2 + .../VtsHalEnvironmentalReverbTargetTest.cpp | 2 + audio/aidl/vts/VtsHalEqualizerTargetTest.cpp | 2 + .../vts/VtsHalHapticGeneratorTargetTest.cpp | 2 + .../vts/VtsHalLoudnessEnhancerTargetTest.cpp | 2 + audio/aidl/vts/VtsHalNSTargetTest.cpp | 2 + .../aidl/vts/VtsHalPresetReverbTargetTest.cpp | 2 + .../aidl/vts/VtsHalVirtualizerTargetTest.cpp | 2 + audio/aidl/vts/VtsHalVisualizerTargetTest.cpp | 2 + audio/aidl/vts/VtsHalVolumeTargetTest.cpp | 2 + 21 files changed, 92 insertions(+), 18 deletions(-) create mode 100644 audio/aidl/vts/TestUtils.cpp diff --git a/audio/aidl/vts/Android.bp b/audio/aidl/vts/Android.bp index a2f0260e30..0de8574a7e 100644 --- a/audio/aidl/vts/Android.bp +++ b/audio/aidl/vts/Android.bp @@ -40,7 +40,10 @@ cc_defaults { "general-tests", "vts", ], - srcs: [":effectCommonFile"], + srcs: [ + ":effectCommonFile", + "TestUtils.cpp", + ], } cc_test { diff --git a/audio/aidl/vts/TestUtils.cpp b/audio/aidl/vts/TestUtils.cpp new file mode 100644 index 0000000000..f0184683f9 --- /dev/null +++ b/audio/aidl/vts/TestUtils.cpp @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "TestUtils.h" + +#define LOG_TAG "VtsHalAudio_TestUtils" + +#include + +namespace android::hardware::audio::common::testing { + +namespace detail { +void TestExecutionTracer::OnTestStart(const ::testing::TestInfo& test_info) { + TraceTestState("Started", test_info); +} + +void TestExecutionTracer::OnTestEnd(const ::testing::TestInfo& test_info) { + TraceTestState("Completed", test_info); +} + +void TestExecutionTracer::OnTestPartResult(const ::testing::TestPartResult& result) { + LOG(INFO) << result; +} + +void TestExecutionTracer::TraceTestState(const std::string& state, + const ::testing::TestInfo& test_info) { + LOG(INFO) << state << " " << test_info.test_suite_name() << "::" << test_info.name(); +} +} +} \ No newline at end of file diff --git a/audio/aidl/vts/TestUtils.h b/audio/aidl/vts/TestUtils.h index b559669856..191e98002e 100644 --- a/audio/aidl/vts/TestUtils.h +++ b/audio/aidl/vts/TestUtils.h @@ -22,11 +22,21 @@ #include #include +#include namespace android::hardware::audio::common::testing { namespace detail { +class TestExecutionTracer : public ::testing::EmptyTestEventListener { + public: + void OnTestStart(const ::testing::TestInfo& test_info) override; + void OnTestEnd(const ::testing::TestInfo& test_info) override; + void OnTestPartResult(const ::testing::TestPartResult& result) override; + private: + static void TraceTestState(const std::string& state, const ::testing::TestInfo& test_info); +}; + inline ::testing::AssertionResult assertIsOk(const char* expr, const ::ndk::ScopedAStatus& status) { if (status.isOk()) { return ::testing::AssertionSuccess(); diff --git a/audio/aidl/vts/VtsHalAECTargetTest.cpp b/audio/aidl/vts/VtsHalAECTargetTest.cpp index 0354e3ce23..39168b1bf1 100644 --- a/audio/aidl/vts/VtsHalAECTargetTest.cpp +++ b/audio/aidl/vts/VtsHalAECTargetTest.cpp @@ -34,6 +34,7 @@ using aidl::android::hardware::audio::effect::IEffect; using aidl::android::hardware::audio::effect::IFactory; using aidl::android::hardware::audio::effect::Parameter; using aidl::android::hardware::audio::effect::Range; +using android::hardware::audio::common::testing::detail::TestExecutionTracer; enum ParamName { PARAM_INSTANCE_NAME, PARAM_ECHO_DELAY, PARAM_MOBILE_MODE }; using AECParamTestParam = std::tuple, Descriptor>, @@ -178,6 +179,7 @@ GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(AECParamTest); int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); + ::testing::UnitTest::GetInstance()->listeners().Append(new TestExecutionTracer()); ABinderProcess_setThreadPoolMaxThreadCount(1); ABinderProcess_startThreadPool(); return RUN_ALL_TESTS(); diff --git a/audio/aidl/vts/VtsHalAGC1TargetTest.cpp b/audio/aidl/vts/VtsHalAGC1TargetTest.cpp index 65c6a8f5fa..6066025efd 100644 --- a/audio/aidl/vts/VtsHalAGC1TargetTest.cpp +++ b/audio/aidl/vts/VtsHalAGC1TargetTest.cpp @@ -28,6 +28,7 @@ using aidl::android::hardware::audio::effect::getEffectTypeUuidAutomaticGainCont using aidl::android::hardware::audio::effect::IEffect; using aidl::android::hardware::audio::effect::IFactory; using aidl::android::hardware::audio::effect::Parameter; +using android::hardware::audio::common::testing::detail::TestExecutionTracer; enum ParamName { PARAM_INSTANCE_NAME, @@ -189,6 +190,7 @@ GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(AGC1ParamTest); int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); + ::testing::UnitTest::GetInstance()->listeners().Append(new TestExecutionTracer()); ABinderProcess_setThreadPoolMaxThreadCount(1); ABinderProcess_startThreadPool(); return RUN_ALL_TESTS(); diff --git a/audio/aidl/vts/VtsHalAGC2TargetTest.cpp b/audio/aidl/vts/VtsHalAGC2TargetTest.cpp index 46a569ef92..8793e4c862 100644 --- a/audio/aidl/vts/VtsHalAGC2TargetTest.cpp +++ b/audio/aidl/vts/VtsHalAGC2TargetTest.cpp @@ -29,6 +29,7 @@ using aidl::android::hardware::audio::effect::getEffectTypeUuidAutomaticGainCont using aidl::android::hardware::audio::effect::IEffect; using aidl::android::hardware::audio::effect::IFactory; using aidl::android::hardware::audio::effect::Parameter; +using android::hardware::audio::common::testing::detail::TestExecutionTracer; enum ParamName { PARAM_INSTANCE_NAME, @@ -194,6 +195,7 @@ GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(AGC2ParamTest); int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); + ::testing::UnitTest::GetInstance()->listeners().Append(new TestExecutionTracer()); ABinderProcess_setThreadPoolMaxThreadCount(1); ABinderProcess_startThreadPool(); return RUN_ALL_TESTS(); diff --git a/audio/aidl/vts/VtsHalAudioCoreModuleTargetTest.cpp b/audio/aidl/vts/VtsHalAudioCoreModuleTargetTest.cpp index 9c52d19da5..53e51f427c 100644 --- a/audio/aidl/vts/VtsHalAudioCoreModuleTargetTest.cpp +++ b/audio/aidl/vts/VtsHalAudioCoreModuleTargetTest.cpp @@ -108,6 +108,7 @@ using aidl::android::media::audio::common::MicrophoneInfo; using aidl::android::media::audio::common::Void; using android::hardware::audio::common::StreamLogic; using android::hardware::audio::common::StreamWorker; +using android::hardware::audio::common::testing::detail::TestExecutionTracer; using ndk::enum_range; using ndk::ScopedAStatus; @@ -4444,21 +4445,6 @@ INSTANTIATE_TEST_SUITE_P(AudioModuleRemoteSubmixTest, AudioModuleRemoteSubmix, ::testing::ValuesIn(getRemoteSubmixModuleInstance())); GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(AudioModuleRemoteSubmix); -class TestExecutionTracer : public ::testing::EmptyTestEventListener { - public: - void OnTestStart(const ::testing::TestInfo& test_info) override { - TraceTestState("Started", test_info); - } - void OnTestEnd(const ::testing::TestInfo& test_info) override { - TraceTestState("Completed", test_info); - } - - private: - static void TraceTestState(const std::string& state, const ::testing::TestInfo& test_info) { - LOG(INFO) << state << " " << test_info.test_suite_name() << "::" << test_info.name(); - } -}; - int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); ::testing::UnitTest::GetInstance()->listeners().Append(new TestExecutionTracer()); diff --git a/audio/aidl/vts/VtsHalAudioEffectFactoryTargetTest.cpp b/audio/aidl/vts/VtsHalAudioEffectFactoryTargetTest.cpp index 225640e1fc..523f20da99 100644 --- a/audio/aidl/vts/VtsHalAudioEffectFactoryTargetTest.cpp +++ b/audio/aidl/vts/VtsHalAudioEffectFactoryTargetTest.cpp @@ -52,6 +52,7 @@ using aidl::android::hardware::audio::effect::Processing; using aidl::android::media::audio::common::AudioSource; using aidl::android::media::audio::common::AudioStreamType; using aidl::android::media::audio::common::AudioUuid; +using android::hardware::audio::common::testing::detail::TestExecutionTracer; /// Effect factory testing. class EffectFactoryTest : public testing::TestWithParam { @@ -303,6 +304,7 @@ GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(EffectFactoryTest); int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); + ::testing::UnitTest::GetInstance()->listeners().Append(new TestExecutionTracer()); ABinderProcess_setThreadPoolMaxThreadCount(1); ABinderProcess_startThreadPool(); return RUN_ALL_TESTS(); diff --git a/audio/aidl/vts/VtsHalAudioEffectTargetTest.cpp b/audio/aidl/vts/VtsHalAudioEffectTargetTest.cpp index 1876756437..ca1cea9aff 100644 --- a/audio/aidl/vts/VtsHalAudioEffectTargetTest.cpp +++ b/audio/aidl/vts/VtsHalAudioEffectTargetTest.cpp @@ -51,6 +51,7 @@ using aidl::android::media::audio::common::AudioDeviceDescription; using aidl::android::media::audio::common::AudioDeviceType; using aidl::android::media::audio::common::AudioMode; using aidl::android::media::audio::common::AudioSource; +using android::hardware::audio::common::testing::detail::TestExecutionTracer; enum ParamName { PARAM_INSTANCE_NAME }; using EffectTestParam = std::tuple, Descriptor>>; @@ -907,6 +908,7 @@ GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(AudioEffectDataPathTest); int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); + ::testing::UnitTest::GetInstance()->listeners().Append(new TestExecutionTracer()); ABinderProcess_setThreadPoolMaxThreadCount(1); ABinderProcess_startThreadPool(); return RUN_ALL_TESTS(); diff --git a/audio/aidl/vts/VtsHalBassBoostTargetTest.cpp b/audio/aidl/vts/VtsHalBassBoostTargetTest.cpp index afddb841ee..2d9a233337 100644 --- a/audio/aidl/vts/VtsHalBassBoostTargetTest.cpp +++ b/audio/aidl/vts/VtsHalBassBoostTargetTest.cpp @@ -32,7 +32,7 @@ using aidl::android::hardware::audio::effect::IEffect; using aidl::android::hardware::audio::effect::IFactory; using aidl::android::hardware::audio::effect::Parameter; using aidl::android::hardware::audio::effect::Range; - +using android::hardware::audio::common::testing::detail::TestExecutionTracer; /** * Here we focus on specific parameter checking, general IEffect interfaces testing performed in * VtsAudioEffectTargetTest. @@ -155,6 +155,7 @@ GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(BassBoostParamTest); int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); + ::testing::UnitTest::GetInstance()->listeners().Append(new TestExecutionTracer()); ABinderProcess_setThreadPoolMaxThreadCount(1); ABinderProcess_startThreadPool(); return RUN_ALL_TESTS(); diff --git a/audio/aidl/vts/VtsHalDownmixTargetTest.cpp b/audio/aidl/vts/VtsHalDownmixTargetTest.cpp index 7a2f31bfe5..c01a9a2d36 100644 --- a/audio/aidl/vts/VtsHalDownmixTargetTest.cpp +++ b/audio/aidl/vts/VtsHalDownmixTargetTest.cpp @@ -28,7 +28,7 @@ using aidl::android::hardware::audio::effect::getEffectTypeUuidDownmix; using aidl::android::hardware::audio::effect::IEffect; using aidl::android::hardware::audio::effect::IFactory; using aidl::android::hardware::audio::effect::Parameter; - +using android::hardware::audio::common::testing::detail::TestExecutionTracer; /** * Here we focus on specific parameter checking, general IEffect interfaces testing performed in * VtsAudioEffectTargetTest. @@ -136,6 +136,7 @@ GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(DownmixParamTest); int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); + ::testing::UnitTest::GetInstance()->listeners().Append(new TestExecutionTracer()); ABinderProcess_setThreadPoolMaxThreadCount(1); ABinderProcess_startThreadPool(); return RUN_ALL_TESTS(); diff --git a/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp b/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp index 5509c76eb9..2650f49cb2 100644 --- a/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp +++ b/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp @@ -36,6 +36,7 @@ using aidl::android::hardware::audio::effect::getEffectTypeUuidDynamicsProcessin using aidl::android::hardware::audio::effect::IEffect; using aidl::android::hardware::audio::effect::IFactory; using aidl::android::hardware::audio::effect::Parameter; +using android::hardware::audio::common::testing::detail::TestExecutionTracer; /** * Here we focus on specific parameter checking, general IEffect interfaces testing performed in @@ -996,6 +997,7 @@ GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(DynamicsProcessingTestMbcBandConfi int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); + ::testing::UnitTest::GetInstance()->listeners().Append(new TestExecutionTracer()); ABinderProcess_setThreadPoolMaxThreadCount(1); ABinderProcess_startThreadPool(); return RUN_ALL_TESTS(); diff --git a/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp b/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp index f2ef185950..474b3610ea 100644 --- a/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp +++ b/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp @@ -28,6 +28,7 @@ using aidl::android::hardware::audio::effect::getEffectTypeUuidEnvReverb; using aidl::android::hardware::audio::effect::IEffect; using aidl::android::hardware::audio::effect::IFactory; using aidl::android::hardware::audio::effect::Parameter; +using android::hardware::audio::common::testing::detail::TestExecutionTracer; /** * Here we focus on specific parameter checking, general IEffect interfaces testing performed in @@ -536,6 +537,7 @@ GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(EnvironmentalReverbBypassTest); int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); + ::testing::UnitTest::GetInstance()->listeners().Append(new TestExecutionTracer()); ABinderProcess_setThreadPoolMaxThreadCount(1); ABinderProcess_startThreadPool(); return RUN_ALL_TESTS(); diff --git a/audio/aidl/vts/VtsHalEqualizerTargetTest.cpp b/audio/aidl/vts/VtsHalEqualizerTargetTest.cpp index 37e7c0a0ff..09396d1c88 100644 --- a/audio/aidl/vts/VtsHalEqualizerTargetTest.cpp +++ b/audio/aidl/vts/VtsHalEqualizerTargetTest.cpp @@ -46,6 +46,7 @@ using aidl::android::hardware::audio::effect::getEffectTypeUuidEqualizer; using aidl::android::hardware::audio::effect::IEffect; using aidl::android::hardware::audio::effect::IFactory; using aidl::android::hardware::audio::effect::Parameter; +using android::hardware::audio::common::testing::detail::TestExecutionTracer; /** * Here we focus on specific effect (equalizer) parameter checking, general IEffect interfaces @@ -220,6 +221,7 @@ GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(EqualizerTest); int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); + ::testing::UnitTest::GetInstance()->listeners().Append(new TestExecutionTracer()); ABinderProcess_setThreadPoolMaxThreadCount(1); ABinderProcess_startThreadPool(); return RUN_ALL_TESTS(); diff --git a/audio/aidl/vts/VtsHalHapticGeneratorTargetTest.cpp b/audio/aidl/vts/VtsHalHapticGeneratorTargetTest.cpp index b33234b04b..5a32398b28 100644 --- a/audio/aidl/vts/VtsHalHapticGeneratorTargetTest.cpp +++ b/audio/aidl/vts/VtsHalHapticGeneratorTargetTest.cpp @@ -33,6 +33,7 @@ using aidl::android::hardware::audio::effect::HapticGenerator; using aidl::android::hardware::audio::effect::IEffect; using aidl::android::hardware::audio::effect::IFactory; using aidl::android::hardware::audio::effect::Parameter; +using android::hardware::audio::common::testing::detail::TestExecutionTracer; /** * Here we focus on specific parameter checking, general IEffect interfaces testing performed in @@ -431,6 +432,7 @@ GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(HapticGeneratorScalesTest); int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); + ::testing::UnitTest::GetInstance()->listeners().Append(new TestExecutionTracer()); ABinderProcess_setThreadPoolMaxThreadCount(1); ABinderProcess_startThreadPool(); return RUN_ALL_TESTS(); diff --git a/audio/aidl/vts/VtsHalLoudnessEnhancerTargetTest.cpp b/audio/aidl/vts/VtsHalLoudnessEnhancerTargetTest.cpp index cbb80a9101..c5e2346cc9 100644 --- a/audio/aidl/vts/VtsHalLoudnessEnhancerTargetTest.cpp +++ b/audio/aidl/vts/VtsHalLoudnessEnhancerTargetTest.cpp @@ -30,6 +30,7 @@ using aidl::android::hardware::audio::effect::IEffect; using aidl::android::hardware::audio::effect::IFactory; using aidl::android::hardware::audio::effect::LoudnessEnhancer; using aidl::android::hardware::audio::effect::Parameter; +using android::hardware::audio::common::testing::detail::TestExecutionTracer; /** * Here we focus on specific parameter checking, general IEffect interfaces testing performed in @@ -141,6 +142,7 @@ GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(LoudnessEnhancerParamTest); int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); + ::testing::UnitTest::GetInstance()->listeners().Append(new TestExecutionTracer()); ABinderProcess_setThreadPoolMaxThreadCount(1); ABinderProcess_startThreadPool(); return RUN_ALL_TESTS(); diff --git a/audio/aidl/vts/VtsHalNSTargetTest.cpp b/audio/aidl/vts/VtsHalNSTargetTest.cpp index 624d5d2991..12d56b0151 100644 --- a/audio/aidl/vts/VtsHalNSTargetTest.cpp +++ b/audio/aidl/vts/VtsHalNSTargetTest.cpp @@ -32,6 +32,7 @@ using aidl::android::hardware::audio::effect::IEffect; using aidl::android::hardware::audio::effect::IFactory; using aidl::android::hardware::audio::effect::NoiseSuppression; using aidl::android::hardware::audio::effect::Parameter; +using android::hardware::audio::common::testing::detail::TestExecutionTracer; enum ParamName { PARAM_INSTANCE_NAME, PARAM_LEVEL, PARAM_TYPE }; using NSParamTestParam = std::tuple, Descriptor>, @@ -171,6 +172,7 @@ GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(NSParamTest); int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); + ::testing::UnitTest::GetInstance()->listeners().Append(new TestExecutionTracer()); ABinderProcess_setThreadPoolMaxThreadCount(1); ABinderProcess_startThreadPool(); return RUN_ALL_TESTS(); diff --git a/audio/aidl/vts/VtsHalPresetReverbTargetTest.cpp b/audio/aidl/vts/VtsHalPresetReverbTargetTest.cpp index 3056c6c1cc..57eda0992c 100644 --- a/audio/aidl/vts/VtsHalPresetReverbTargetTest.cpp +++ b/audio/aidl/vts/VtsHalPresetReverbTargetTest.cpp @@ -29,6 +29,7 @@ using aidl::android::hardware::audio::effect::IEffect; using aidl::android::hardware::audio::effect::IFactory; using aidl::android::hardware::audio::effect::Parameter; using aidl::android::hardware::audio::effect::PresetReverb; +using android::hardware::audio::common::testing::detail::TestExecutionTracer; /** * Here we focus on specific parameter checking, general IEffect interfaces testing performed in @@ -147,6 +148,7 @@ GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(PresetReverbParamTest); int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); + ::testing::UnitTest::GetInstance()->listeners().Append(new TestExecutionTracer()); ABinderProcess_setThreadPoolMaxThreadCount(1); ABinderProcess_startThreadPool(); return RUN_ALL_TESTS(); diff --git a/audio/aidl/vts/VtsHalVirtualizerTargetTest.cpp b/audio/aidl/vts/VtsHalVirtualizerTargetTest.cpp index 07a9fa4e70..3e39d3a67d 100644 --- a/audio/aidl/vts/VtsHalVirtualizerTargetTest.cpp +++ b/audio/aidl/vts/VtsHalVirtualizerTargetTest.cpp @@ -28,6 +28,7 @@ using aidl::android::hardware::audio::effect::IEffect; using aidl::android::hardware::audio::effect::IFactory; using aidl::android::hardware::audio::effect::Parameter; using aidl::android::hardware::audio::effect::Virtualizer; +using android::hardware::audio::common::testing::detail::TestExecutionTracer; /** * Here we focus on specific parameter checking, general IEffect interfaces testing performed in @@ -151,6 +152,7 @@ GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(VirtualizerParamTest); int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); + ::testing::UnitTest::GetInstance()->listeners().Append(new TestExecutionTracer()); ABinderProcess_setThreadPoolMaxThreadCount(1); ABinderProcess_startThreadPool(); return RUN_ALL_TESTS(); diff --git a/audio/aidl/vts/VtsHalVisualizerTargetTest.cpp b/audio/aidl/vts/VtsHalVisualizerTargetTest.cpp index 903ba696be..1b8352b8ca 100644 --- a/audio/aidl/vts/VtsHalVisualizerTargetTest.cpp +++ b/audio/aidl/vts/VtsHalVisualizerTargetTest.cpp @@ -31,6 +31,7 @@ using aidl::android::hardware::audio::effect::IEffect; using aidl::android::hardware::audio::effect::IFactory; using aidl::android::hardware::audio::effect::Parameter; using aidl::android::hardware::audio::effect::Visualizer; +using android::hardware::audio::common::testing::detail::TestExecutionTracer; /** * Here we focus on specific parameter checking, general IEffect interfaces testing performed in @@ -207,6 +208,7 @@ GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(VisualizerParamTest); int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); + ::testing::UnitTest::GetInstance()->listeners().Append(new TestExecutionTracer()); ABinderProcess_setThreadPoolMaxThreadCount(1); ABinderProcess_startThreadPool(); return RUN_ALL_TESTS(); diff --git a/audio/aidl/vts/VtsHalVolumeTargetTest.cpp b/audio/aidl/vts/VtsHalVolumeTargetTest.cpp index 0b5b9fc3dc..257100b9cf 100644 --- a/audio/aidl/vts/VtsHalVolumeTargetTest.cpp +++ b/audio/aidl/vts/VtsHalVolumeTargetTest.cpp @@ -28,6 +28,7 @@ using aidl::android::hardware::audio::effect::IEffect; using aidl::android::hardware::audio::effect::IFactory; using aidl::android::hardware::audio::effect::Parameter; using aidl::android::hardware::audio::effect::Volume; +using android::hardware::audio::common::testing::detail::TestExecutionTracer; /** * Here we focus on specific parameter checking, general IEffect interfaces testing performed in @@ -159,6 +160,7 @@ GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(VolumeParamTest); int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); + ::testing::UnitTest::GetInstance()->listeners().Append(new TestExecutionTracer()); ABinderProcess_setThreadPoolMaxThreadCount(1); ABinderProcess_startThreadPool(); return RUN_ALL_TESTS();