MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / OutputFlagAlsoCheckEnvVar

Function OutputFlagAlsoCheckEnvVar

tests/gtest/gtest-all.cc:11084–11091  ·  view source on GitHub ↗

As a special case for the 'output' flag, if GTEST_OUTPUT is not set, we look for XML_OUTPUT_FILE, which is set by the Bazel build system. The value of XML_OUTPUT_FILE is a filename without the "xml:" prefix of GTEST_OUTPUT. Note that this is meant to be called at the call site so it does not check that the flag is 'output' In essence this checks an env variable called XML_OUTPUT_FILE and if it is

Source from the content-addressed store, hash-verified

11082// In essence this checks an env variable called XML_OUTPUT_FILE
11083// and if it is set we prepend "xml:" to its value, if it not set we return ""
11084std::string OutputFlagAlsoCheckEnvVar(){
11085 std::string default_value_for_output_flag = "";
11086 const char* xml_output_file_env = posix::GetEnv("XML_OUTPUT_FILE");
11087 if (nullptr != xml_output_file_env) {
11088 default_value_for_output_flag = std::string("xml:") + xml_output_file_env;
11089 }
11090 return default_value_for_output_flag;
11091}
11092
11093// Reads and returns the string environment variable corresponding to
11094// the given flag; if it's not set, returns default_value.

Callers 1

gtest-all.ccFile · 0.85

Calls 1

GetEnvFunction · 0.85

Tested by

no test coverage detected