29 #if (defined(WIN32) || defined(_WIN32) || defined(__WIN32)) && !defined(__CYGWIN__) && !defined(__MINGW32__) && 0
33 if(!_dupenv_s(&flowId, &sz,
"TEAMCITY_PROCESS_FLOW_ID")) {
40 const char *flowId = getenv(
"TEAMCITY_PROCESS_FLOW_ID");
41 return flowId ==
NULL ?
"" : flowId;
46 #if (defined(WIN32) || defined(_WIN32) || defined(__WIN32)) && !defined(__CYGWIN__) && !defined(__MINGW32__) && 0
47 char *teamCityProjectName = 0;
50 if(!_dupenv_s(&teamCityProjectName, &sz,
"TEAMCITY_PROJECT_NAME")) {
52 free(teamCityProjectName);
57 return getenv(
"TEAMCITY_PROJECT_NAME") !=
NULL;
71 result.reserve(s.length());
73 for (
size_t i = 0;
i < s.length();
i++) {
77 case '\n':
result.append(
"|n");
break;
78 case '\r':
result.append(
"|r");
break;
79 case '\'':
result.append(
"|'");
break;
80 case '|':
result.append(
"||");
break;
81 case ']':
result.append(
"|]");
break;
82 default:
result.append(&c, 1);
90 *
m_out <<
"##teamcity[" << name;
106 if(flowid.length() > 0) {
116 if(flowid.length() > 0) {
126 if(flowid.length() > 0) {
130 if(captureStandardOutput) {
142 if(flowid.length() > 0) {
146 if(durationMs >= 0) {
160 if(flowid.length() > 0) {
171 if(flowid.length() > 0) {
179 openMsg(isStdError ?
"testStdErr" :
"testStdOut");
182 if(flowid.length() > 0) {
void testFailed(const std::string &name, const std::string &message, const std::string &details, const std::string &flowid=std::string())
void suiteStarted(const std::string &name, const std::string &flowid=std::string())
void openMsg(const std::string &name)
void writeProperty(const std::string &name, const std::string &value)
void testOutput(const std::string &name, const std::string &output, const std::string &flowid, bool isStdErr=StdOut)
void setOutput(std::ostream &)
void testFinished(const std::string &name, int durationMs=-1, const std::string &flowid=std::string())
std::string escape(const std::string &s)
void suiteFinished(const std::string &name, const std::string &flowid=std::string())
void testIgnored(const std::string &name, const std::string &message, const std::string &flowid=std::string())
void testStarted(const std::string &name, const std::string &flowid=std::string(), bool captureStandardOutput=false)
std::ofstream out("events_result.xml")
main entry point for tests
std::string getFlowIdFromEnvironment()
static SQLCHAR output[256]