Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1054)

Unified Diff: webrtc/voice_engine/test/auto_test/voe_standard_test.cc

Issue 2681153003: Remove unused voe_stress_test.cc (Closed)
Patch Set: Removed more things after rebase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/voice_engine/test/auto_test/voe_standard_test.cc
diff --git a/webrtc/voice_engine/test/auto_test/voe_standard_test.cc b/webrtc/voice_engine/test/auto_test/voe_standard_test.cc
index 448764ef85eef8913430e1ad092671b06fd82757..2630f5facd706060f3993cbbffa7319393b51e16 100644
--- a/webrtc/voice_engine/test/auto_test/voe_standard_test.cc
+++ b/webrtc/voice_engine/test/auto_test/voe_standard_test.cc
@@ -18,7 +18,6 @@
#include "webrtc/typedefs.h"
#include "webrtc/voice_engine/include/voe_neteq_stats.h"
#include "webrtc/voice_engine/test/auto_test/automated_mode.h"
-#include "webrtc/voice_engine/test/auto_test/voe_stress_test.h"
#include "webrtc/voice_engine/test/auto_test/voe_test_defines.h"
#include "webrtc/voice_engine/voice_engine_defines.h"
@@ -85,166 +84,6 @@ void SubAPIManager::DisplayStatus() const {
TEST_LOG(" AudioProcessing\n");
ANL();
}
-
-VoETestManager::VoETestManager()
- : initialized_(false),
- voice_engine_(NULL),
- voe_base_(0),
- voe_codec_(0),
- voe_xmedia_(0),
- voe_file_(0),
- voe_hardware_(0),
- voe_network_(0),
- voe_neteq_stats_(NULL),
- voe_rtp_rtcp_(0),
- voe_vsync_(0),
- voe_volume_control_(0),
- voe_apm_(0) {
-}
-
-VoETestManager::~VoETestManager() {
-}
-
-bool VoETestManager::Init() {
- if (initialized_)
- return true;
-
- voice_engine_ = VoiceEngine::Create();
- if (!voice_engine_) {
- TEST_LOG("Failed to create VoiceEngine\n");
- return false;
- }
-
- return true;
-}
-
-void VoETestManager::GetInterfaces() {
- if (voice_engine_) {
- voe_base_ = VoEBase::GetInterface(voice_engine_);
- voe_codec_ = VoECodec::GetInterface(voice_engine_);
- voe_volume_control_ = VoEVolumeControl::GetInterface(voice_engine_);
- voe_rtp_rtcp_ = VoERTP_RTCP::GetInterface(voice_engine_);
- voe_apm_ = VoEAudioProcessing::GetInterface(voice_engine_);
- voe_network_ = VoENetwork::GetInterface(voice_engine_);
- voe_file_ = VoEFile::GetInterface(voice_engine_);
-#ifdef _TEST_VIDEO_SYNC_
- voe_vsync_ = VoEVideoSync::GetInterface(voice_engine_);
-#endif
- voe_hardware_ = VoEHardware::GetInterface(voice_engine_);
- // Set the audio layer to use in all tests
- if (voe_hardware_) {
- int res = voe_hardware_->SetAudioDeviceLayer(TESTED_AUDIO_LAYER);
- if (res < 0) {
- printf("\nERROR: failed to set audio layer to use in "
- "testing\n");
- } else {
- printf("\nAudio layer %d will be used in testing\n",
- TESTED_AUDIO_LAYER);
- }
- }
-#ifdef _TEST_XMEDIA_
- voe_xmedia_ = VoEExternalMedia::GetInterface(voice_engine_);
-#endif
- voe_neteq_stats_ = VoENetEqStats::GetInterface(voice_engine_);
- }
-}
-
-int VoETestManager::ReleaseInterfaces() {
- bool releaseOK(true);
-
- if (voe_base_) {
- voe_base_->Release();
- voe_base_ = NULL;
- }
- if (voe_codec_) {
- voe_codec_->Release();
- voe_codec_ = NULL;
- }
- if (voe_volume_control_) {
- voe_volume_control_->Release();
- voe_volume_control_ = NULL;
- }
- if (voe_rtp_rtcp_) {
- voe_rtp_rtcp_->Release();
- voe_rtp_rtcp_ = NULL;
- }
- if (voe_apm_) {
- voe_apm_->Release();
- voe_apm_ = NULL;
- }
- if (voe_network_) {
- voe_network_->Release();
- voe_network_ = NULL;
- }
- if (voe_file_) {
- voe_file_->Release();
- voe_file_ = NULL;
- }
-#ifdef _TEST_VIDEO_SYNC_
- if (voe_vsync_) {
- voe_vsync_->Release();
- voe_vsync_ = NULL;
- }
-#endif
- if (voe_hardware_) {
- voe_hardware_->Release();
- voe_hardware_ = NULL;
- }
-#ifdef _TEST_XMEDIA_
- if (voe_xmedia_) {
- voe_xmedia_->Release();
- voe_xmedia_ = NULL;
- }
-#endif
- if (voe_neteq_stats_) {
- voe_neteq_stats_->Release();
- voe_neteq_stats_ = NULL;
- }
- if (false == VoiceEngine::Delete(voice_engine_)) {
- TEST_LOG("\n\nVoiceEngine::Delete() failed. \n");
- releaseOK = false;
- }
-
- return (releaseOK == true) ? 0 : -1;
-}
-
-int run_auto_test(TestType test_type) {
- assert(test_type != Standard);
-
- SubAPIManager api_manager;
- api_manager.DisplayStatus();
-
- ////////////////////////////////////
- // Create VoiceEngine and sub API:s
-
- voetest::VoETestManager test_manager;
- if (!test_manager.Init()) {
- return -1;
- }
- test_manager.GetInterfaces();
-
- int result = -1;
- if (test_type == Stress) {
- VoEStressTest stressTest(test_manager);
- result = stressTest.DoTest();
- } else {
- // Should never end up here
- assert(false);
- }
-
- //////////////////
- // Release/Delete
-
- int release_ok = test_manager.ReleaseInterfaces();
-
- if ((0 == result) && (release_ok != -1)) {
- TEST_LOG("\n\n*** All tests passed *** \n\n");
- } else {
- TEST_LOG("\n\n*** Test failed! *** \n");
- }
-
- return 0;
-}
} // namespace voetest
int RunInManualMode() {
@@ -257,42 +96,22 @@ int RunInManualMode() {
printf("Select type of test\n\n");
printf(" (0) Quit\n");
printf(" (1) Standard test\n");
- printf(" (2) [OBSOLETE: Extended test(s)...]\n");
- printf(" (3) Stress test(s)...\n");
- printf(" (4) [OBSOLETE: Unit test(s)...]\n");
printf("\n: ");
int selection(0);
dummy = scanf("%d", &selection);
- TestType test_type = Invalid;
switch (selection) {
case 0:
return 0;
case 1:
- test_type = Standard;
- break;
- case 2:
- break;
- case 3:
- test_type = Stress;
- break;
- case 4:
- break;
+ TEST_LOG("\n\n+++ Running standard tests +++\n\n");
+ // Currently, all googletest-rewritten tests are in the "automated" suite.
+ return RunInAutomatedMode();
default:
TEST_LOG("Invalid selection!\n");
return 0;
}
-
- if (test_type == Standard) {
- TEST_LOG("\n\n+++ Running standard tests +++\n\n");
-
- // Currently, all googletest-rewritten tests are in the "automated" suite.
- return RunInAutomatedMode();
- }
-
- // Function that can be called from other entry functions.
- return run_auto_test(test_type);
}
// ----------------------------------------------------------------------------
« no previous file with comments | « webrtc/voice_engine/test/auto_test/voe_standard_test.h ('k') | webrtc/voice_engine/test/auto_test/voe_stress_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698