From 52ec985d8206df64d621e375e9d6d8a93a30b585 Mon Sep 17 00:00:00 2001 From: "kjellander@webrtc.org" Date: Tue, 27 Nov 2012 10:01:01 +0000 Subject: [PATCH] Fixing vie and voe auto test project paths for test execution. By letting fileutils.h know the path to the executable, the tests will be able to find the project root dir and resource file paths even when the test is executed outside the checkout dir. See http://review.webrtc.org/858014/ for more background. Today, these tests are failing in the FYI waterfall since they are run "Chromium style" (i.e. from one level above the checkout dir). Since we're moving in that direction this needs to be fixed. It has been fixed for all other tests already. TEST=Local test execution of vie_auto_test and voe_auto_test with CWD one level above trunk/ Review URL: https://webrtc-codereview.appspot.com/974004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3173 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../video_engine/test/auto_test/source/vie_autotest_main.cc | 4 ++++ webrtc/voice_engine/test/auto_test/automated_mode.cc | 3 +++ 2 files changed, 7 insertions(+) diff --git a/webrtc/video_engine/test/auto_test/source/vie_autotest_main.cc b/webrtc/video_engine/test/auto_test/source/vie_autotest_main.cc index a062bdba4e..21b972662b 100644 --- a/webrtc/video_engine/test/auto_test/source/vie_autotest_main.cc +++ b/webrtc/video_engine/test/auto_test/source/vie_autotest_main.cc @@ -12,9 +12,11 @@ #include "gflags/gflags.h" #include "gtest/gtest.h" + #include "video_engine/test/auto_test/interface/vie_autotest.h" #include "video_engine/test/auto_test/interface/vie_autotest_window_manager_interface.h" #include "video_engine/test/auto_test/interface/vie_window_creator.h" +#include "test/testsupport/fileutils.h" DEFINE_bool(automated, false, "Run Video engine tests in noninteractive mode."); DEFINE_bool(auto_custom_call, false, "Run custom call directly."); @@ -38,6 +40,8 @@ ViEAutoTestMain::ViEAutoTestMain() { int ViEAutoTestMain::RunTests(int argc, char** argv) { // Initialize logging. ViETest::Init(); + // Initialize WebRTC testing framework so paths to resources can be resolved. + webrtc::test::SetExecutablePath(argv[0]); // Initialize the testing framework. testing::InitGoogleTest(&argc, argv); // Parse remaining flags: diff --git a/webrtc/voice_engine/test/auto_test/automated_mode.cc b/webrtc/voice_engine/test/auto_test/automated_mode.cc index a8b624490b..83d0c14d70 100644 --- a/webrtc/voice_engine/test/auto_test/automated_mode.cc +++ b/webrtc/voice_engine/test/auto_test/automated_mode.cc @@ -9,8 +9,11 @@ */ #include "gtest/gtest.h" +#include "test/testsupport/fileutils.h" void InitializeGoogleTest(int* argc, char** argv) { + // Initialize WebRTC testing framework so paths to resources can be resolved. + webrtc::test::SetExecutablePath(argv[0]); testing::InitGoogleTest(argc, argv); }