Add test env for TEMP environment variable
A workaround for ASSERT_DEATH on Windows
Change-Id: I379bd873e6219167da03a0240663bb457225ec65
diff --git a/jenkins/jobs/BUILD b/jenkins/jobs/BUILD
index e4e06c5..6073f48 100644
--- a/jenkins/jobs/BUILD
+++ b/jenkins/jobs/BUILD
@@ -179,6 +179,11 @@
# TODO(pcloudy): This is only for Windows.
# Remove it after wrapper-less CROSSTOOL becomes default
"--action_env=NO_MSVC_WRAPPER=1",
+ # TODO(pcloudy): Remove this after TEMP is properly set.
+ # A workaround for ASSERT_DEATH in gtest on Windows.
+ # When running tests, Bazel doesn't set TEMP,
+ # ASSERT_DEATH will try to write to C:/Windows, then fails.
+ "--test_env=TEMP",
],
config = ":configs/bazel-tests.json",
configure = [
diff --git a/jenkins/jobs/configs/bazel-tests.json b/jenkins/jobs/configs/bazel-tests.json
index 780368f..6f859f9 100644
--- a/jenkins/jobs/configs/bazel-tests.json
+++ b/jenkins/jobs/configs/bazel-tests.json
@@ -86,6 +86,13 @@
// Remove it after wrapper-less CROSSTOOL becomes default
"--action_env=NO_MSVC_WRAPPER=1"
],
+ "test_opts": [
+ // TODO(pcloudy): Remove this after TEMP is properly set.
+ // A workaround for ASSERT_DEATH in gtest on Windows.
+ // When running tests, Bazel doesn't set TEMP,
+ // ASSERT_DEATH will try to write to C:/Windows, then fails.
+ "--test_env=TEMP",
+ ],
"test_tag_filters": ["-no_windows"],
"tests": [
"//src/test/py/...",