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
This commit is contained in:
parent
022239d6ba
commit
28d0140ed2
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user