aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/cpp
diff options
context:
space:
mode:
authorGravatar Thiago Farina <tfarina@chromium.org>2015-04-07 13:48:49 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2015-04-08 08:46:11 +0000
commitdfe43a2b1dd75a270edc2f8d2ab498e19dec6f8a (patch)
treee9eb756aba27455426e4c6d84c228880b7b2c79e /src/main/cpp
parent7ce73fb075501ef33506afeb31faf53b077af055 (diff)
Cleanup: Refactor the test of TEST_TMPDIR env variable.
No need to keep a separate variable at the top of the file, it is simpler to just check the return value of getenv() directly in the call site. -- Change-Id: I896836206ccbf20743ef9679b10cec0cb7406122 MOS_MIGRATED_REVID=90505777
Diffstat (limited to 'src/main/cpp')
-rw-r--r--src/main/cpp/blaze.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/main/cpp/blaze.cc b/src/main/cpp/blaze.cc
index 9e9e506e62..39dff42231 100644
--- a/src/main/cpp/blaze.cc
+++ b/src/main/cpp/blaze.cc
@@ -76,9 +76,6 @@ using std::vector;
namespace blaze {
-// Blaze is being run by a test.
-static const bool TESTING = getenv("TEST_TMPDIR") != NULL;
-
extern char **environ;
////////////////////////////////////////////////////////////////////////
@@ -1403,7 +1400,7 @@ static void CheckEnvironment() {
unsetenv("_JAVA_OPTIONS");
}
- if (TESTING) {
+ if (getenv("TEST_TMPDIR") != NULL) {
fprintf(stderr, "INFO: $TEST_TMPDIR defined: output root default is "
"'%s'.\n", globals->options.output_root.c_str());
}