mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
gtest: Add plugin for TeamCity integration
Automatically report unit tests to the TeamCity server if run within TeamCity. See tests/gtest/teamcity/README.cef for details. To test: Set the TEAMCITY_PROJECT_NAME environment variable and run ceftests.
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include "include/cef_file_util.h"
|
||||
#include "include/wrapper/cef_scoped_temp_dir.h"
|
||||
#include "tests/gtest/include/gtest/gtest.h"
|
||||
#include "tests/gtest/teamcity/include/teamcity_gtest.h"
|
||||
#include "tests/shared/common/client_switches.h"
|
||||
|
||||
namespace {
|
||||
@@ -121,6 +122,12 @@ void CefTestSuite::InitMainProcess() {
|
||||
|
||||
// This will modify |argc_| and |argv_|.
|
||||
testing::InitGoogleTest(&argc_, argv_.array());
|
||||
|
||||
if (jetbrains::teamcity::underTeamcity()) {
|
||||
auto& listeners = ::testing::UnitTest::GetInstance()->listeners();
|
||||
listeners.Append(
|
||||
new jetbrains::teamcity::TeamcityGoogleTestEventListener());
|
||||
}
|
||||
}
|
||||
|
||||
// Don't add additional code to this method. Instead add it to Initialize().
|
||||
|
Reference in New Issue
Block a user