From 28d0140ed26f445d3cbb37f7ecc987df93480578 Mon Sep 17 00:00:00 2001 From: "andrew@webrtc.org" Date: Thu, 18 Oct 2012 00:42:32 +0000 Subject: [PATCH] Allow audioproc_unittest to be run with an absolute path. r2942 depended on TestSuite, which in turn depends on Gmock. This is not available in the Android platform build. Here, we call SetExecutablePath directly instead. TBR=kjellander@webrtc.org TESTED=invoked audioproc_unittest with an absolute path in a working directory outside the tree. Review URL: https://webrtc-codereview.appspot.com/892005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2944 4adac7df-926f-26a2-2b94-8c16560cd09d --- src/modules/audio_processing/test/unit_test.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/modules/audio_processing/test/unit_test.cc b/src/modules/audio_processing/test/unit_test.cc index 8aceb4251d..221facdf5b 100644 --- a/src/modules/audio_processing/test/unit_test.cc +++ b/src/modules/audio_processing/test/unit_test.cc @@ -19,7 +19,6 @@ #include "module_common_types.h" #include "scoped_ptr.h" #include "signal_processing_library.h" -#include "test/test_suite.h" #include "test/testsupport/fileutils.h" #include "thread_wrapper.h" #include "trace.h" @@ -1429,10 +1428,12 @@ int main(int argc, char** argv) { } } - webrtc::test::TestSuite test_suite(argc, argv); - int error = test_suite.Run(); - + // We don't use TestSuite here because it would require the Android platform + // build to depend on Gmock. + webrtc::test::SetExecutablePath(argv[0]); + testing::InitGoogleTest(&argc, argv); + int result = RUN_ALL_TESTS(); // Optional, but removes memory leak noise from Valgrind. google::protobuf::ShutdownProtobufLibrary(); - return error; + return result; }