mirror of
https://github.com/copyrighttxt/watrbx-game-engine.git
synced 2026-09-04 20:57:49 +00:00
GEEKING
This commit is contained in:
@@ -0,0 +1,124 @@
|
||||
|
||||
#include "rbx/test/Base.UnitTest.Lib.h"
|
||||
#include "boost/test/unit_test_suite.hpp"
|
||||
#include "JetBrains/teamcity_messages.h"
|
||||
|
||||
using namespace JetBrains;
|
||||
BOOST_GLOBAL_FIXTURE(TeamcityFormatterRegistrar);
|
||||
|
||||
namespace RBX { namespace Test {
|
||||
|
||||
bool BaseGlobalFixture::fflagsAllOn = false;
|
||||
bool BaseGlobalFixture::fflagsAllOff = false;
|
||||
|
||||
BaseGlobalFixture::BaseGlobalFixture()
|
||||
{
|
||||
boost::unit_test::framework::register_observer(*this);
|
||||
if (!RBX::assertionHook())
|
||||
RBX::setAssertionHook(&handleDebugAssert);
|
||||
|
||||
if (!RBX::failureHook())
|
||||
RBX::setFailureHook(&handleFailure);
|
||||
|
||||
setAreAssertsTested(true);
|
||||
}
|
||||
|
||||
bool BaseGlobalFixture::tooManyAssertionsCheck()
|
||||
{
|
||||
const long maxCount = 100;
|
||||
|
||||
long count = assertCount++;
|
||||
|
||||
if (count < maxCount)
|
||||
return false;
|
||||
|
||||
if (count == maxCount)
|
||||
BOOST_MESSAGE("Too many assertions. No more will be reported for the current test");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool BaseGlobalFixture::handleDebugAssert(const char* expression, const char* filename, int lineNumber)
|
||||
{
|
||||
if (!tooManyAssertionsCheck())
|
||||
{
|
||||
std::string message = "Assertion Failed: ";
|
||||
message += expression;
|
||||
BOOST_CHECK_MESSAGE_SOURCE(false, message.c_str(), filename, lineNumber);
|
||||
}
|
||||
return false; // let other processing take place, too
|
||||
}
|
||||
|
||||
bool BaseGlobalFixture::handleFailure(const char* expression, const char* filename, int lineNumber)
|
||||
{
|
||||
std::string message = "Assertion Failed: ";
|
||||
message += expression;
|
||||
BOOST_REQUIRE_MESSAGE_SOURCE(false, message.c_str(), filename, lineNumber);
|
||||
return true; // Don't let other processing take place. We're going to exit
|
||||
}
|
||||
|
||||
static bool skipFastFlag(const char* flagName) {
|
||||
return
|
||||
// Test flags (never remove)
|
||||
strcmp(flagName, "TestFastFlag") == 0 ||
|
||||
strcmp(flagName, "TestTrueValue") == 0 ||
|
||||
strcmp(flagName, "TestFalseValue") == 0 ||
|
||||
// Debug flags
|
||||
strncmp(flagName, "Debug", 5) == 0 ||
|
||||
// Broken flags
|
||||
strcmp(flagName, "UseClusterCache") == 0;
|
||||
}
|
||||
|
||||
static void setFFlag(const std::string& name, const std::string& varValue, void* context)
|
||||
{
|
||||
if (!skipFastFlag(name.c_str())) {
|
||||
bool value = *reinterpret_cast<bool*>(context);
|
||||
if(value && varValue == "false")
|
||||
FLog::SetValue(name, "true", FASTVARTYPE_ANY, false);
|
||||
if(!value && varValue == "true")
|
||||
FLog::SetValue(name, "false", FASTVARTYPE_ANY, false);
|
||||
}
|
||||
}
|
||||
|
||||
static void setAllFFlags(bool value)
|
||||
{
|
||||
BaseGlobalFixture::fflagsAllOn = value;
|
||||
BaseGlobalFixture::fflagsAllOff = !value;
|
||||
FLog::ForEachVariable(&setFFlag, &value, FASTVARTYPE_ANY);
|
||||
}
|
||||
|
||||
bool BaseGlobalFixture::processArg( const std::string arg )
|
||||
{
|
||||
if (arg.find("--help") == 0)
|
||||
{
|
||||
std::cout << "ROBLOX custom arguments:\n";
|
||||
std::cout << " --fflags=true|false - override all FFlag values\n";
|
||||
return false;
|
||||
}
|
||||
|
||||
const char* fflagArg = "--fflags=";
|
||||
if (arg.find(fflagArg) == 0)
|
||||
{
|
||||
std::string fflagValue = arg.substr(strlen(fflagArg));
|
||||
if (fflagValue == "true")
|
||||
{
|
||||
BOOST_MESSAGE("setting all FFlags to true");
|
||||
setAllFFlags(true);
|
||||
}
|
||||
else if (fflagValue == "false")
|
||||
{
|
||||
BOOST_MESSAGE("setting all FFlags to false");
|
||||
setAllFFlags(false);
|
||||
}
|
||||
else
|
||||
throw boost::unit_test::framework::setup_error("bad fflag value. Must be true or false");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
rbx::atomic<int> BaseGlobalFixture::assertCount;
|
||||
}}
|
||||
@@ -0,0 +1,118 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{C5E89A79-BBC2-4FF3-80E1-69F5291F0C3C}</ProjectGuid>
|
||||
<RootNamespace>BaseUnitTestLib</RootNamespace>
|
||||
<SccProjectName>SAK</SccProjectName>
|
||||
<SccLocalPath>SAK</SccLocalPath>
|
||||
<SccProvider>SAK</SccProvider>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<SccAuxPath>SAK</SccAuxPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset>v140_xp</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>11.0.50727.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(CONTRIB_PATH)\boost_1_56_0\include;.\include;.\include\JetBrains;..\Base\include;..\TBB_4_1\include;..\Log\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>BOOST_THREAD_BUILD_LIB;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalOptions>/D "_SECURE_SCL=0" %(AdditionalOptions)</AdditionalOptions>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>$(CONTRIB_PATH)\boost_1_56_0\include;.\include;.\include\JetBrains;..\Base\include;..\TBB_4_1\include;..\Log\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>BOOST_THREAD_BUILD_LIB;WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Base.UnitTest.Lib.cpp" />
|
||||
<ClCompile Include="teamcity_boost.cpp" />
|
||||
<ClCompile Include="teamcity_messages.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\rbx\test\Base.UnitTest.Lib.h" />
|
||||
<ClInclude Include="include\rbx\test\ErrorLogsFixture.h" />
|
||||
<ClInclude Include="include\rbx\test\ScopedFastFlagSetting.h" />
|
||||
<ClInclude Include="include\JetBrains\teamcity_messages.h" />
|
||||
<ClInclude Include="include\rbx\test\test_tools.h" />
|
||||
<ClInclude Include="include\rbx\test\TimeoutFixture.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="teamcity_README.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Base\Base.vcxproj">
|
||||
<Project>{3025c00a-7746-469b-a279-96127c72abee}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\boostlibs\boost.test.vcxproj">
|
||||
<Project>{55b54c4c-1951-4d6b-af5a-794214553001}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Base.UnitTest.Lib.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="teamcity_boost.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="teamcity_messages.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\rbx\test\Base.UnitTest.Lib.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\rbx\test\ErrorLogsFixture.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\rbx\test\ScopedFastFlagSetting.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\JetBrains\teamcity_messages.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\rbx\test\test_tools.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\rbx\test\TimeoutFixture.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="teamcity_README.txt" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,580 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
10EE19B715DC2CEF00C77EF8 /* libboost-d-1_55.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 10EE19B615DC2CE700C77EF8 /* libboost-d-1_55.a */; };
|
||||
1F28447615E6F96400120D64 /* ErrorLogsFixture.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F8D261712DCEF1500EF0515 /* ErrorLogsFixture.h */; };
|
||||
1F28447715E6F96400120D64 /* test_tools.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F8D261812DCEF1500EF0515 /* test_tools.h */; };
|
||||
1F28447815E6F96400120D64 /* TimeoutFixture.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F8D261912DCEF1500EF0515 /* TimeoutFixture.h */; };
|
||||
1F28447915E6F96400120D64 /* teamcity_messages.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F8D261D12DCEF2500EF0515 /* teamcity_messages.h */; };
|
||||
1F28447A15E6F96400120D64 /* Base.UnitTest.Lib.h in Headers */ = {isa = PBXBuildFile; fileRef = 52743DC415053D570062A339 /* Base.UnitTest.Lib.h */; };
|
||||
1F28447C15E6F96400120D64 /* teamcity_boost.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1F8D261212DCEEEC00EF0515 /* teamcity_boost.cpp */; };
|
||||
1F28447D15E6F96400120D64 /* teamcity_messages.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1F8D261312DCEEEC00EF0515 /* teamcity_messages.cpp */; };
|
||||
1F28447E15E6F96400120D64 /* Base.UnitTest.Lib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 52743DC615053D620062A339 /* Base.UnitTest.Lib.cpp */; };
|
||||
1F28448015E6F96400120D64 /* libboost-d-1_55.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 10EE19B615DC2CE700C77EF8 /* libboost-d-1_55.a */; };
|
||||
1F8D261412DCEEEC00EF0515 /* teamcity_boost.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1F8D261212DCEEEC00EF0515 /* teamcity_boost.cpp */; };
|
||||
1F8D261512DCEEEC00EF0515 /* teamcity_messages.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1F8D261312DCEEEC00EF0515 /* teamcity_messages.cpp */; };
|
||||
1F8D261A12DCEF1500EF0515 /* ErrorLogsFixture.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F8D261712DCEF1500EF0515 /* ErrorLogsFixture.h */; };
|
||||
1F8D261B12DCEF1500EF0515 /* test_tools.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F8D261812DCEF1500EF0515 /* test_tools.h */; };
|
||||
1F8D261C12DCEF1500EF0515 /* TimeoutFixture.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F8D261912DCEF1500EF0515 /* TimeoutFixture.h */; };
|
||||
1F8D261E12DCEF2500EF0515 /* teamcity_messages.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F8D261D12DCEF2500EF0515 /* teamcity_messages.h */; };
|
||||
52743DC515053D570062A339 /* Base.UnitTest.Lib.h in Headers */ = {isa = PBXBuildFile; fileRef = 52743DC415053D570062A339 /* Base.UnitTest.Lib.h */; };
|
||||
52743DC715053D620062A339 /* Base.UnitTest.Lib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 52743DC615053D620062A339 /* Base.UnitTest.Lib.cpp */; };
|
||||
9FA5E957167A8D5B0040EE8C /* ScopedFastFlagSetting.h in Headers */ = {isa = PBXBuildFile; fileRef = 9FA5E956167A8D5B0040EE8C /* ScopedFastFlagSetting.h */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
10EE19B315DC2CE700C77EF8 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 10EE19AE15DC2CE700C77EF8 /* boost.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = D2AAC09D05546B4700DB518D;
|
||||
remoteInfo = boost;
|
||||
};
|
||||
10EE19B515DC2CE700C77EF8 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 10EE19AE15DC2CE700C77EF8 /* boost.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = E79762DF12886ADD00CE6714;
|
||||
remoteInfo = boost_static;
|
||||
};
|
||||
10EE19C215DC2D4400C77EF8 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 10EE19AE15DC2CE700C77EF8 /* boost.xcodeproj */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = E79762DE12886ADD00CE6714;
|
||||
remoteInfo = boost_static;
|
||||
};
|
||||
1F28447415E6F96400120D64 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 10EE19AE15DC2CE700C77EF8 /* boost.xcodeproj */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = E79762DE12886ADD00CE6714;
|
||||
remoteInfo = boost_static;
|
||||
};
|
||||
1F97D9E315EC086700993FF3 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 10EE19AE15DC2CE700C77EF8 /* boost.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 106B8D7D15E7217400C1FF6B;
|
||||
remoteInfo = "Boost static iOS";
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
10EE19AE15DC2CE700C77EF8 /* boost.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = boost.xcodeproj; path = ../boostlibs/boost.xcodeproj; sourceTree = SOURCE_ROOT; };
|
||||
1F28448415E6F96400120D64 /* libBase.UnitTest.iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libBase.UnitTest.iOS.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
1F8D261212DCEEEC00EF0515 /* teamcity_boost.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = teamcity_boost.cpp; sourceTree = "<group>"; };
|
||||
1F8D261312DCEEEC00EF0515 /* teamcity_messages.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = teamcity_messages.cpp; sourceTree = "<group>"; };
|
||||
1F8D261712DCEF1500EF0515 /* ErrorLogsFixture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ErrorLogsFixture.h; path = include/rbx/test/ErrorLogsFixture.h; sourceTree = "<group>"; };
|
||||
1F8D261812DCEF1500EF0515 /* test_tools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = test_tools.h; path = include/rbx/test/test_tools.h; sourceTree = "<group>"; };
|
||||
1F8D261912DCEF1500EF0515 /* TimeoutFixture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TimeoutFixture.h; path = include/rbx/test/TimeoutFixture.h; sourceTree = "<group>"; };
|
||||
1F8D261D12DCEF2500EF0515 /* teamcity_messages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = teamcity_messages.h; path = include/JetBrains/teamcity_messages.h; sourceTree = "<group>"; };
|
||||
52743DC415053D570062A339 /* Base.UnitTest.Lib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Base.UnitTest.Lib.h; path = include/rbx/test/Base.UnitTest.Lib.h; sourceTree = "<group>"; };
|
||||
52743DC615053D620062A339 /* Base.UnitTest.Lib.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Base.UnitTest.Lib.cpp; sourceTree = "<group>"; };
|
||||
9FA5E956167A8D5B0040EE8C /* ScopedFastFlagSetting.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScopedFastFlagSetting.h; path = include/rbx/test/ScopedFastFlagSetting.h; sourceTree = "<group>"; };
|
||||
D2AAC046055464E500DB518D /* libBase.UnitTest.Lib.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libBase.UnitTest.Lib.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
1F28447F15E6F96400120D64 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
1F28448015E6F96400120D64 /* libboost-d-1_55.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
D289987405E68DCB004EDB86 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
10EE19B715DC2CEF00C77EF8 /* libboost-d-1_55.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
08FB7794FE84155DC02AAC07 /* Base.UnitTest.Lib */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
10EE19AE15DC2CE700C77EF8 /* boost.xcodeproj */,
|
||||
1F8D261612DCEEF300EF0515 /* Header */,
|
||||
08FB7795FE84155DC02AAC07 /* Source */,
|
||||
C6A0FF2B0290797F04C91782 /* Documentation */,
|
||||
1AB674ADFE9D54B511CA2CBB /* Products */,
|
||||
);
|
||||
name = Base.UnitTest.Lib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
08FB7795FE84155DC02AAC07 /* Source */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
52743DC615053D620062A339 /* Base.UnitTest.Lib.cpp */,
|
||||
1F8D261212DCEEEC00EF0515 /* teamcity_boost.cpp */,
|
||||
1F8D261312DCEEEC00EF0515 /* teamcity_messages.cpp */,
|
||||
);
|
||||
name = Source;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
10EE19AF15DC2CE700C77EF8 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
10EE19B415DC2CE700C77EF8 /* Boost_1_55.dylib */,
|
||||
10EE19B615DC2CE700C77EF8 /* libboost-d-1_55.a */,
|
||||
1F97D9E415EC086700993FF3 /* libBoost static iOS.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1AB674ADFE9D54B511CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D2AAC046055464E500DB518D /* libBase.UnitTest.Lib.a */,
|
||||
1F28448415E6F96400120D64 /* libBase.UnitTest.iOS.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1F8D261612DCEEF300EF0515 /* Header */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9FA5E956167A8D5B0040EE8C /* ScopedFastFlagSetting.h */,
|
||||
52743DC415053D570062A339 /* Base.UnitTest.Lib.h */,
|
||||
1F8D261D12DCEF2500EF0515 /* teamcity_messages.h */,
|
||||
1F8D261712DCEF1500EF0515 /* ErrorLogsFixture.h */,
|
||||
1F8D261812DCEF1500EF0515 /* test_tools.h */,
|
||||
1F8D261912DCEF1500EF0515 /* TimeoutFixture.h */,
|
||||
);
|
||||
name = Header;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C6A0FF2B0290797F04C91782 /* Documentation */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
name = Documentation;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
1F28447515E6F96400120D64 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
1F28447615E6F96400120D64 /* ErrorLogsFixture.h in Headers */,
|
||||
1F28447715E6F96400120D64 /* test_tools.h in Headers */,
|
||||
1F28447815E6F96400120D64 /* TimeoutFixture.h in Headers */,
|
||||
1F28447915E6F96400120D64 /* teamcity_messages.h in Headers */,
|
||||
1F28447A15E6F96400120D64 /* Base.UnitTest.Lib.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
D2AAC043055464E500DB518D /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
1F8D261A12DCEF1500EF0515 /* ErrorLogsFixture.h in Headers */,
|
||||
1F8D261B12DCEF1500EF0515 /* test_tools.h in Headers */,
|
||||
1F8D261C12DCEF1500EF0515 /* TimeoutFixture.h in Headers */,
|
||||
1F8D261E12DCEF2500EF0515 /* teamcity_messages.h in Headers */,
|
||||
52743DC515053D570062A339 /* Base.UnitTest.Lib.h in Headers */,
|
||||
9FA5E957167A8D5B0040EE8C /* ScopedFastFlagSetting.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
1F28447215E6F96400120D64 /* Base.UnitTest.iOS */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 1F28448115E6F96400120D64 /* Build configuration list for PBXNativeTarget "Base.UnitTest.iOS" */;
|
||||
buildPhases = (
|
||||
1F28447515E6F96400120D64 /* Headers */,
|
||||
1F28447B15E6F96400120D64 /* Sources */,
|
||||
1F28447F15E6F96400120D64 /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
1F28447315E6F96400120D64 /* PBXTargetDependency */,
|
||||
);
|
||||
name = Base.UnitTest.iOS;
|
||||
productName = Base.UnitTest.Lib;
|
||||
productReference = 1F28448415E6F96400120D64 /* libBase.UnitTest.iOS.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
D2AAC045055464E500DB518D /* Base.UnitTest.Lib */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 1DEB91EB08733DB70010E9CD /* Build configuration list for PBXNativeTarget "Base.UnitTest.Lib" */;
|
||||
buildPhases = (
|
||||
D2AAC043055464E500DB518D /* Headers */,
|
||||
D2AAC044055464E500DB518D /* Sources */,
|
||||
D289987405E68DCB004EDB86 /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
10EE19C315DC2D4400C77EF8 /* PBXTargetDependency */,
|
||||
);
|
||||
name = Base.UnitTest.Lib;
|
||||
productName = Base.UnitTest.Lib;
|
||||
productReference = D2AAC046055464E500DB518D /* libBase.UnitTest.Lib.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
08FB7793FE84155DC02AAC07 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
};
|
||||
buildConfigurationList = 1DEB91EF08733DB70010E9CD /* Build configuration list for PBXProject "Base.UnitTest.Lib" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 1;
|
||||
knownRegions = (
|
||||
English,
|
||||
Japanese,
|
||||
French,
|
||||
German,
|
||||
);
|
||||
mainGroup = 08FB7794FE84155DC02AAC07 /* Base.UnitTest.Lib */;
|
||||
projectDirPath = "";
|
||||
projectReferences = (
|
||||
{
|
||||
ProductGroup = 10EE19AF15DC2CE700C77EF8 /* Products */;
|
||||
ProjectRef = 10EE19AE15DC2CE700C77EF8 /* boost.xcodeproj */;
|
||||
},
|
||||
);
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
D2AAC045055464E500DB518D /* Base.UnitTest.Lib */,
|
||||
1F28447215E6F96400120D64 /* Base.UnitTest.iOS */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXReferenceProxy section */
|
||||
10EE19B415DC2CE700C77EF8 /* Boost_1_55.dylib */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = "compiled.mach-o.dylib";
|
||||
path = Boost_1_55.dylib;
|
||||
remoteRef = 10EE19B315DC2CE700C77EF8 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
10EE19B615DC2CE700C77EF8 /* libboost-d-1_55.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = "libboost-d-1_55.a";
|
||||
remoteRef = 10EE19B515DC2CE700C77EF8 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
1F97D9E415EC086700993FF3 /* libBoost static iOS.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = "libBoost static iOS.a";
|
||||
remoteRef = 1F97D9E315EC086700993FF3 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
/* End PBXReferenceProxy section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
1F28447B15E6F96400120D64 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
1F28447C15E6F96400120D64 /* teamcity_boost.cpp in Sources */,
|
||||
1F28447D15E6F96400120D64 /* teamcity_messages.cpp in Sources */,
|
||||
1F28447E15E6F96400120D64 /* Base.UnitTest.Lib.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
D2AAC044055464E500DB518D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
1F8D261412DCEEEC00EF0515 /* teamcity_boost.cpp in Sources */,
|
||||
1F8D261512DCEEEC00EF0515 /* teamcity_messages.cpp in Sources */,
|
||||
52743DC715053D620062A339 /* Base.UnitTest.Lib.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
10EE19C315DC2D4400C77EF8 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = boost_static;
|
||||
targetProxy = 10EE19C215DC2D4400C77EF8 /* PBXContainerItemProxy */;
|
||||
};
|
||||
1F28447315E6F96400120D64 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = boost_static;
|
||||
targetProxy = 1F28447415E6F96400120D64 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
1DEB91EC08733DB70010E9CD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_VERSION = "";
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(CONTRIB_PATH)/boost_1_55_0/include",
|
||||
../Base/include,
|
||||
../Log/include,
|
||||
./include,
|
||||
);
|
||||
INSTALL_PATH = /usr/local/lib;
|
||||
PRODUCT_NAME = Base.UnitTest.Lib;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1DEB91ED08733DB70010E9CD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_VERSION = "";
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(CONTRIB_PATH)/boost_1_55_0/include",
|
||||
../Base/include,
|
||||
../Log/include,
|
||||
./include,
|
||||
);
|
||||
INSTALL_PATH = /usr/local/lib;
|
||||
PRODUCT_NAME = Base.UnitTest.Lib;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
1DEB91F008733DB70010E9CD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = i386;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = "_DEBUG=1";
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_VERSION = 4.2;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = macosx10.8;
|
||||
VALID_ARCHS = i386;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1DEB91F108733DB70010E9CD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = i386;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = "NDEBUG=1";
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_VERSION = 4.2;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = macosx10.8;
|
||||
VALID_ARCHS = i386;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
1F28448215E6F96400120D64 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = (
|
||||
armv7,
|
||||
armv6,
|
||||
);
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"$(inherited)",
|
||||
RBX_PLATFORM_IOS,
|
||||
);
|
||||
GCC_VERSION = com.apple.compilers.llvmgcc42;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(CONTRIB_PATH)/boost_1_55_0/include",
|
||||
../Base/include,
|
||||
../Log/include,
|
||||
./include,
|
||||
);
|
||||
INSTALL_PATH = /usr/local/lib;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 4.0;
|
||||
PRODUCT_NAME = Base.UnitTest.iOS;
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
|
||||
VALID_ARCHS = "armv6 armv7";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1F28448315E6F96400120D64 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = (
|
||||
armv7,
|
||||
armv6,
|
||||
);
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"$(inherited)",
|
||||
RBX_PLATFORM_IOS,
|
||||
);
|
||||
GCC_VERSION = com.apple.compilers.llvmgcc42;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(CONTRIB_PATH)/boost_1_55_0/include",
|
||||
../Base/include,
|
||||
../Log/include,
|
||||
./include,
|
||||
);
|
||||
INSTALL_PATH = /usr/local/lib;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 4.0;
|
||||
PRODUCT_NAME = Base.UnitTest.iOS;
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
|
||||
VALID_ARCHS = "armv6 armv7";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
D0D04FC91C75F2A900CDE19D /* NoOpt */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = i386;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"NDEBUG=1",
|
||||
"_NOOPT=1",
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_VERSION = 4.2;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = macosx10.8;
|
||||
VALID_ARCHS = i386;
|
||||
};
|
||||
name = NoOpt;
|
||||
};
|
||||
D0D04FCA1C75F2A900CDE19D /* NoOpt */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_VERSION = "";
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(CONTRIB_PATH)/boost_1_55_0/include",
|
||||
../Base/include,
|
||||
../Log/include,
|
||||
./include,
|
||||
);
|
||||
INSTALL_PATH = /usr/local/lib;
|
||||
PRODUCT_NAME = Base.UnitTest.Lib;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = NoOpt;
|
||||
};
|
||||
D0D04FCB1C75F2A900CDE19D /* NoOpt */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = (
|
||||
armv7,
|
||||
armv6,
|
||||
);
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"$(inherited)",
|
||||
RBX_PLATFORM_IOS,
|
||||
);
|
||||
GCC_VERSION = com.apple.compilers.llvmgcc42;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(CONTRIB_PATH)/boost_1_55_0/include",
|
||||
../Base/include,
|
||||
../Log/include,
|
||||
./include,
|
||||
);
|
||||
INSTALL_PATH = /usr/local/lib;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 4.0;
|
||||
PRODUCT_NAME = Base.UnitTest.iOS;
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
|
||||
VALID_ARCHS = "armv6 armv7";
|
||||
};
|
||||
name = NoOpt;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
1DEB91EB08733DB70010E9CD /* Build configuration list for PBXNativeTarget "Base.UnitTest.Lib" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1DEB91EC08733DB70010E9CD /* Debug */,
|
||||
1DEB91ED08733DB70010E9CD /* Release */,
|
||||
D0D04FCA1C75F2A900CDE19D /* NoOpt */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
1DEB91EF08733DB70010E9CD /* Build configuration list for PBXProject "Base.UnitTest.Lib" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1DEB91F008733DB70010E9CD /* Debug */,
|
||||
1DEB91F108733DB70010E9CD /* Release */,
|
||||
D0D04FC91C75F2A900CDE19D /* NoOpt */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
1F28448115E6F96400120D64 /* Build configuration list for PBXNativeTarget "Base.UnitTest.iOS" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1F28448215E6F96400120D64 /* Debug */,
|
||||
1F28448315E6F96400120D64 /* Release */,
|
||||
D0D04FCB1C75F2A900CDE19D /* NoOpt */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
/* Copyright 2009 JetBrains
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* $Revision: 50800 $
|
||||
*/
|
||||
|
||||
#ifndef H_TEAMCITY_MESSAGES
|
||||
#define H_TEAMCITY_MESSAGES
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
namespace JetBrains {
|
||||
|
||||
bool underTeamcity();
|
||||
|
||||
struct TeamcityFormatterRegistrar {
|
||||
TeamcityFormatterRegistrar();
|
||||
};
|
||||
class TeamcityMessages {
|
||||
std::ostream *m_out;
|
||||
|
||||
protected:
|
||||
std::string escape(std::string s);
|
||||
|
||||
void openMsg(const std::string &name);
|
||||
void writeProperty(std::string name, std::string value);
|
||||
void closeMsg();
|
||||
|
||||
public:
|
||||
TeamcityMessages();
|
||||
|
||||
void setOutput(std::ostream &);
|
||||
|
||||
void suiteStarted(std::string name);
|
||||
void suiteFinished(std::string name);
|
||||
|
||||
void testStarted(std::string name);
|
||||
void testFailed(std::string name, std::string message, std::string details = "");
|
||||
void testIgnored(std::string name, std::string message = "");
|
||||
void testFinished(std::string name, unsigned long elapsed);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* H_TEAMCITY_MESSAGES */
|
||||
@@ -0,0 +1,62 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rbx/test/test_tools.h"
|
||||
#include "boost/test/test_observer.hpp"
|
||||
#include "boost/test/framework.hpp"
|
||||
|
||||
namespace RBX { namespace Test {
|
||||
|
||||
class BaseGlobalFixture : public boost::unit_test::test_observer
|
||||
{
|
||||
static rbx::atomic<int> assertCount;
|
||||
|
||||
virtual void test_unit_finish( boost::unit_test::test_unit const&, unsigned long /* elapsed */ )
|
||||
{
|
||||
assertCount = 0;
|
||||
}
|
||||
|
||||
static bool tooManyAssertionsCheck();
|
||||
static bool handleDebugAssert(const char* expression, const char* filename, int lineNumber);
|
||||
static bool handleFailure(const char* expression, const char* filename, int lineNumber);
|
||||
public:
|
||||
|
||||
static bool fflagsAllOn;
|
||||
static bool fflagsAllOff;
|
||||
|
||||
static void setAreAssertsTested(bool value)
|
||||
{
|
||||
FLog::Asserts = value ? 1 : 0;
|
||||
}
|
||||
|
||||
BaseGlobalFixture();
|
||||
|
||||
~BaseGlobalFixture()
|
||||
{
|
||||
boost::unit_test::framework::deregister_observer(*this);
|
||||
}
|
||||
|
||||
// returns true if the arg is processed
|
||||
static bool processArg(const std::string arg);
|
||||
};
|
||||
|
||||
|
||||
class PerformanceTestFixture
|
||||
{
|
||||
const FLog::Channel oldValue;
|
||||
public:
|
||||
PerformanceTestFixture()
|
||||
:oldValue(FLog::Asserts)
|
||||
{
|
||||
BOOST_MESSAGE("Running performance test");
|
||||
BOOST_CHECK(true); // to prevent "Test case doesn't include any assertions"
|
||||
|
||||
FLog::Asserts = 0;
|
||||
}
|
||||
~PerformanceTestFixture()
|
||||
{
|
||||
FLog::Asserts = oldValue;
|
||||
}
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
#include "util/standardout.h"
|
||||
|
||||
namespace RBX { namespace Test {
|
||||
|
||||
class CaptureErrorLogs
|
||||
{
|
||||
rbx::signals::scoped_connection connection;
|
||||
static void onMessage(const RBX::StandardOutMessage& message)
|
||||
{
|
||||
BOOST_CHECK_MESSAGE(message.type != RBX::MESSAGE_ERROR, message.message);
|
||||
// ??? BOOST_WARN_MESSAGE(message.type != RBX::MESSAGE_WARNING, message.message);
|
||||
}
|
||||
public:
|
||||
CaptureErrorLogs()
|
||||
{
|
||||
connection = RBX::StandardOut::singleton()->messageOut.connect(&CaptureErrorLogs::onMessage);
|
||||
}
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,68 @@
|
||||
#pragma once
|
||||
|
||||
// FOR TESTS ONLY.
|
||||
// DO NOT USE THIS IN ANY NON-TEST CODE
|
||||
// THIS HAS NO THREADING GUARANTEES, AND IS UNSUITABLE FOR PRODUCTION
|
||||
|
||||
// Most tests will not need this. Instead, the command line option
|
||||
// --fflags can be used to run tests with different flags enabled / disabled.
|
||||
|
||||
// Because FastFlags are static (process scoped), it can be difficult to
|
||||
// know exactly when in the execution a FastFlag is read. For this reason,
|
||||
// be extra careful to examine the uses of a FastFlag before setting it
|
||||
// in a unit test. Beware, some flags are only read at startup time, and
|
||||
// the effects of the flag are not changed if the flag value is subsequently
|
||||
// changed.
|
||||
|
||||
#include "FastLog.h"
|
||||
#include "rbx/Debug.h"
|
||||
|
||||
struct ScopedFastFlagSetting {
|
||||
private:
|
||||
bool success;
|
||||
std::string oldValue;
|
||||
const char* flagName;
|
||||
public:
|
||||
ScopedFastFlagSetting(const char* flagName, bool value) : flagName(flagName) {
|
||||
success = false;
|
||||
success = FLog::GetValue(flagName, oldValue)
|
||||
&& FLog::SetValue(flagName, value ? "True" : "False", FASTVARTYPE_ANY, false);
|
||||
RBXASSERT(success);
|
||||
}
|
||||
~ScopedFastFlagSetting() {
|
||||
if (success) {
|
||||
FLog::SetValue(flagName, oldValue, FASTVARTYPE_ANY, false);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
struct ScopedFastIntSetting {
|
||||
private:
|
||||
bool success;
|
||||
std::string oldValue;
|
||||
const char* flagName;
|
||||
public:
|
||||
ScopedFastIntSetting(const char* flagName, int value) : flagName(flagName) {
|
||||
success = false;
|
||||
std::string newValueString = convertToString(value);
|
||||
success = FLog::GetValue(flagName, oldValue)
|
||||
&& FLog::SetValue(flagName, newValueString, FASTVARTYPE_ANY, false);
|
||||
RBXASSERT(success);
|
||||
}
|
||||
~ScopedFastIntSetting() {
|
||||
if (success) {
|
||||
FLog::SetValue(flagName, oldValue, FASTVARTYPE_ANY, false);
|
||||
}
|
||||
}
|
||||
|
||||
std::string convertToString(int a)
|
||||
{
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4996)
|
||||
char temp[200];
|
||||
snprintf(temp, 200-1, "%d", a);
|
||||
return temp;
|
||||
#pragma warning(pop)
|
||||
}
|
||||
};
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
#pragma once
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/thread.hpp>
|
||||
|
||||
namespace RBX { namespace Test {
|
||||
|
||||
template<int timeout>
|
||||
class TimeoutFixture
|
||||
{
|
||||
boost::thread thread;
|
||||
volatile bool done;
|
||||
boost::condition_variable cond;
|
||||
boost::mutex mut;
|
||||
|
||||
void monitor()
|
||||
{
|
||||
boost::system_time const time = boost::get_system_time() + boost::posix_time::seconds(timeout);
|
||||
{
|
||||
boost::unique_lock<boost::mutex> lock(mut);
|
||||
if (!done)
|
||||
BOOST_REQUIRE_MESSAGE(cond.timed_wait(lock, time), "Timeout reached!");
|
||||
}
|
||||
}
|
||||
public:
|
||||
TimeoutFixture()
|
||||
:done(false)
|
||||
{
|
||||
boost::unique_lock<boost::mutex> lock(mut);
|
||||
thread = boost::thread(boost::bind(&TimeoutFixture::monitor, this));
|
||||
}
|
||||
|
||||
~TimeoutFixture()
|
||||
{
|
||||
{
|
||||
boost::unique_lock<boost::mutex> lock(mut);
|
||||
done = true;
|
||||
cond.notify_one();
|
||||
}
|
||||
thread.join();
|
||||
}
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,72 @@
|
||||
#pragma once
|
||||
|
||||
#include "boost/test/test_tools.hpp"
|
||||
#include "rbx/Debug.h"
|
||||
#include "rbx/atomic.h"
|
||||
#include "rbx/rbxTime.h"
|
||||
#include "boost/thread.hpp"
|
||||
#include "boost/date_time/posix_time/posix_time.hpp"
|
||||
|
||||
#define RBX_TEST_WITH_TIMEOUT(F, T) testWithTimeout(F, T, BOOST_STRINGIZE(F))
|
||||
|
||||
static void checkNoThrow(boost::function<void()> f, std::string stringized)
|
||||
{
|
||||
try
|
||||
{
|
||||
f();
|
||||
}
|
||||
catch(RBX::base_exception& ex)
|
||||
{
|
||||
BOOST_CHECK_IMPL( false, RBX::format("exception '%s' thrown by %s", ex.what(), stringized.c_str() ), CHECK, CHECK_MSG );
|
||||
}
|
||||
catch( ... )
|
||||
{
|
||||
BOOST_CHECK_IMPL( false, RBX::format("exception thrown by %s", stringized.c_str() ), CHECK, CHECK_MSG );
|
||||
}
|
||||
}
|
||||
|
||||
static void testWithTimeout(boost::function<void()> f, RBX::Time::Interval timeout, std::string stringized)
|
||||
{
|
||||
boost::thread t(boost::bind(&checkNoThrow, f, stringized));
|
||||
|
||||
BOOST_CHECK_MESSAGE(
|
||||
t.timed_join(boost::posix_time::milliseconds((int)(timeout.seconds()*1000.0))),
|
||||
RBX::format("Timeout of '%s' after %g seconds", stringized.c_str(), timeout.seconds())
|
||||
);
|
||||
}
|
||||
|
||||
#define RBX_CHECK_NO_EXECEPTION_IMPL( S, TL ) \
|
||||
try { \
|
||||
S; \
|
||||
BOOST_CHECK_IMPL( true, "no exceptions thrown by " BOOST_STRINGIZE( S ), TL, CHECK_MSG ); } \
|
||||
catch(RBX::base_exception& ex) { \
|
||||
std::string message = ex.what(); \
|
||||
message += " thrown by " BOOST_STRINGIZE( S ); \
|
||||
BOOST_CHECK_IMPL( false, ex.what(), TL, CHECK_MSG ); \
|
||||
} \
|
||||
/**/
|
||||
|
||||
#define RBX_WARN_NO_EXECEPTION( S ) RBX_CHECK_NO_EXECEPTION_IMPL( S, WARN )
|
||||
#define RBX_CHECK_NO_EXECEPTION( S ) RBX_CHECK_NO_EXECEPTION_IMPL( S, CHECK )
|
||||
#define RBX_REQUIRE_NO_EXECEPTION( S ) RBX_CHECK_NO_EXECEPTION_IMPL( S, REQUIRE )
|
||||
|
||||
#define BOOST_TEST_TOOL_IMPL2( func, P, check_descr, TL, CT, F, L ) \
|
||||
::boost::test_tools::tt_detail::func( \
|
||||
P, \
|
||||
::boost::unit_test::lazy_ostream::instance() << check_descr, \
|
||||
F, \
|
||||
(std::size_t)L, \
|
||||
::boost::test_tools::tt_detail::TL, \
|
||||
::boost::test_tools::tt_detail::CT \
|
||||
/**/
|
||||
|
||||
#define BOOST_CHECK_IMPL2( P, check_descr, TL, CT, F, L ) \
|
||||
do { \
|
||||
BOOST_TEST_PASSPOINT(); \
|
||||
BOOST_TEST_TOOL_IMPL2( check_impl, P, check_descr, TL, CT, F, L ), 0 );\
|
||||
} while( ::boost::test_tools::dummy_cond ) \
|
||||
/**/
|
||||
|
||||
#define BOOST_CHECK_MESSAGE_SOURCE( P, M, F, L ) BOOST_CHECK_IMPL2( (P), M, CHECK, CHECK_MSG, F, L )
|
||||
#define BOOST_REQUIRE_MESSAGE_SOURCE( P, M, F, L ) BOOST_CHECK_IMPL2( (P), M, REQUIRE, CHECK_MSG, F, L )
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
Boost listener for TeamCity
|
||||
---------------------------
|
||||
|
||||
To report your tests result to TeamCity server
|
||||
just include teamcity_messages.* teamcity_boost.cpp
|
||||
to your project.
|
||||
|
||||
That code will register global fixture
|
||||
( http://www.boost.org/doc/libs/1_38_0/libs/test/doc/html/utf/user-guide/fixture/global.html )
|
||||
to replace output formatter if run under TeamCity.
|
||||
|
||||
If you have tests with test parameters,
|
||||
look at http://jetbrains.net/tracker/issue/TW-7043 for quick solution.
|
||||
|
||||
Technical details
|
||||
-----------------
|
||||
|
||||
Reporting implemented as writing TeamCity service messages to stdout.
|
||||
|
||||
See
|
||||
http://www.jetbrains.net/confluence/display/TCD3/Build+Script+Interaction+with+TeamCity
|
||||
for more details.
|
||||
|
||||
Contact information
|
||||
-------------------
|
||||
|
||||
See http://www.jetbrains.com/support/teamcity
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
Apache, version 2.0
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
@@ -0,0 +1,147 @@
|
||||
/* Copyright 2009 JetBrains
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* $Revision: 51262 $
|
||||
*/
|
||||
|
||||
#include "teamcity_messages.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/test/unit_test_log_formatter.hpp>
|
||||
#include <boost/test/results_collector.hpp>
|
||||
|
||||
using namespace boost::unit_test;
|
||||
using namespace std;
|
||||
|
||||
namespace JetBrains {
|
||||
|
||||
// Custom formatter for TeamCity messages
|
||||
class TeamcityBoostLogFormatter: public boost::unit_test::unit_test_log_formatter {
|
||||
TeamcityMessages messages;
|
||||
std::string currentDetails;
|
||||
|
||||
public:
|
||||
TeamcityBoostLogFormatter();
|
||||
|
||||
void log_start(std::ostream&, boost::unit_test::counter_t test_cases_amount);
|
||||
void log_finish(std::ostream&);
|
||||
void log_build_info(std::ostream&);
|
||||
|
||||
void test_unit_start(std::ostream&, boost::unit_test::test_unit const& tu);
|
||||
void test_unit_finish(std::ostream&,
|
||||
boost::unit_test::test_unit const& tu,
|
||||
unsigned long elapsed);
|
||||
void test_unit_skipped(std::ostream&, boost::unit_test::test_unit const& tu);
|
||||
|
||||
void log_exception(std::ostream&,
|
||||
boost::unit_test::log_checkpoint_data const&,
|
||||
boost::unit_test::const_string explanation);
|
||||
|
||||
void log_entry_start(std::ostream&,
|
||||
boost::unit_test::log_entry_data const&,
|
||||
log_entry_types let);
|
||||
void log_entry_value(std::ostream&, boost::unit_test::const_string value);
|
||||
void log_entry_finish(std::ostream&);
|
||||
};
|
||||
|
||||
// Fake fixture to register formatter
|
||||
TeamcityFormatterRegistrar::TeamcityFormatterRegistrar() {
|
||||
if (JetBrains::underTeamcity()) {
|
||||
boost::unit_test::unit_test_log.set_formatter(new JetBrains::TeamcityBoostLogFormatter());
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_GLOBAL_FIXTURE(TeamcityFormatterRegistrar);
|
||||
|
||||
// Formatter implementation
|
||||
string toString(const_string bstr) {
|
||||
stringstream ss;
|
||||
|
||||
ss << bstr;
|
||||
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
TeamcityBoostLogFormatter::TeamcityBoostLogFormatter() {
|
||||
}
|
||||
|
||||
void TeamcityBoostLogFormatter::log_start(ostream &out, counter_t test_cases_amount)
|
||||
{}
|
||||
|
||||
void TeamcityBoostLogFormatter::log_finish(ostream &out)
|
||||
{}
|
||||
|
||||
void TeamcityBoostLogFormatter::log_build_info(ostream &out)
|
||||
{}
|
||||
|
||||
void TeamcityBoostLogFormatter::test_unit_start(ostream &out, test_unit const& tu) {
|
||||
messages.setOutput(out);
|
||||
|
||||
if (tu.p_type == tut_case) {
|
||||
messages.testStarted(tu.p_name);
|
||||
} else {
|
||||
messages.suiteStarted(tu.p_name);
|
||||
}
|
||||
|
||||
currentDetails.clear();
|
||||
}
|
||||
|
||||
void TeamcityBoostLogFormatter::test_unit_finish(ostream &out, test_unit const& tu, unsigned long elapsed) {
|
||||
messages.setOutput(out);
|
||||
|
||||
test_results const& tr = results_collector.results( tu.p_id );
|
||||
if (tu.p_type == tut_case) {
|
||||
if(!tr.passed()) {
|
||||
if(tr.p_skipped) {
|
||||
messages.testIgnored(tu.p_name);
|
||||
} else if (tr.p_aborted) {
|
||||
messages.testFailed(tu.p_name, "aborted", currentDetails);
|
||||
} else {
|
||||
messages.testFailed(tu.p_name, "failed", currentDetails);
|
||||
}
|
||||
}
|
||||
|
||||
messages.testFinished(tu.p_name, elapsed);
|
||||
} else {
|
||||
messages.suiteFinished(tu.p_name);
|
||||
}
|
||||
}
|
||||
|
||||
void TeamcityBoostLogFormatter::test_unit_skipped(ostream &out, test_unit const& tu)
|
||||
{}
|
||||
|
||||
void TeamcityBoostLogFormatter::log_exception(ostream &out, log_checkpoint_data const&, const_string explanation) {
|
||||
string what = toString(explanation);
|
||||
|
||||
out << what << endl;
|
||||
currentDetails += what + "\n";
|
||||
}
|
||||
|
||||
|
||||
void TeamcityBoostLogFormatter::log_entry_start(ostream&, log_entry_data const&, log_entry_types let)
|
||||
{}
|
||||
|
||||
void TeamcityBoostLogFormatter::log_entry_value(ostream &out, const_string value) {
|
||||
out << value;
|
||||
currentDetails += toString(value);
|
||||
}
|
||||
|
||||
void TeamcityBoostLogFormatter::log_entry_finish(ostream &out) {
|
||||
out << endl;
|
||||
currentDetails += "\n";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
/* Copyright 2009 JetBrains
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* $Revision: 51263 $
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "teamcity_messages.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace JetBrains {
|
||||
|
||||
bool underTeamcity() {
|
||||
return getenv("TEAMCITY_PROJECT_NAME") != NULL;
|
||||
}
|
||||
|
||||
TeamcityMessages::TeamcityMessages()
|
||||
: m_out(&cout)
|
||||
{}
|
||||
|
||||
void TeamcityMessages::setOutput(ostream &out) {
|
||||
m_out = &out;
|
||||
}
|
||||
|
||||
string TeamcityMessages::escape(string s) {
|
||||
string result;
|
||||
|
||||
for (size_t i = 0; i < s.length(); i++) {
|
||||
char c = s[i];
|
||||
|
||||
switch (c) {
|
||||
case '\n': result.append("|n"); break;
|
||||
case '\r': result.append("|r"); break;
|
||||
case '\'': result.append("|'"); break;
|
||||
case '|': result.append("||"); break;
|
||||
case ']': result.append("|]"); break;
|
||||
default: result.append(&c, 1);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void TeamcityMessages::openMsg(const string &name) {
|
||||
// endl for http://jetbrains.net/tracker/issue/TW-4412
|
||||
*m_out << endl << "##teamcity[" << name;
|
||||
}
|
||||
|
||||
void TeamcityMessages::closeMsg() {
|
||||
*m_out << "]";
|
||||
// endl for http://jetbrains.net/tracker/issue/TW-4412
|
||||
*m_out << endl;
|
||||
m_out->flush();
|
||||
}
|
||||
|
||||
void TeamcityMessages::writeProperty(string name, string value) {
|
||||
*m_out << " " << name << "='" << escape(value) << "'";
|
||||
}
|
||||
|
||||
void TeamcityMessages::suiteStarted(string name) {
|
||||
openMsg("testSuiteStarted");
|
||||
writeProperty("name", name);
|
||||
closeMsg();
|
||||
}
|
||||
|
||||
void TeamcityMessages::suiteFinished(string name) {
|
||||
openMsg("testSuiteFinished");
|
||||
writeProperty("name", name);
|
||||
closeMsg();
|
||||
}
|
||||
|
||||
void TeamcityMessages::testStarted(string name) {
|
||||
openMsg("testStarted");
|
||||
writeProperty("name", name);
|
||||
closeMsg();
|
||||
}
|
||||
|
||||
void TeamcityMessages::testFinished(string name, unsigned long elapsed) {
|
||||
openMsg("testFinished");
|
||||
writeProperty("name", name);
|
||||
char buffer[32];
|
||||
sprintf(buffer, "%lu", elapsed/1000);
|
||||
writeProperty("duration", buffer);
|
||||
closeMsg();
|
||||
}
|
||||
|
||||
void TeamcityMessages::testFailed(string name, string message, string details) {
|
||||
openMsg("testFailed");
|
||||
writeProperty("name", name);
|
||||
writeProperty("message", message);
|
||||
writeProperty("details", details);
|
||||
closeMsg();
|
||||
}
|
||||
|
||||
void TeamcityMessages::testIgnored(std::string name, std::string message) {
|
||||
openMsg("testIgnored");
|
||||
writeProperty("name", name);
|
||||
writeProperty("message", message);
|
||||
closeMsg();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user