diff --git a/tools/test/test-setup.sh b/tools/test/test-setup.sh index 952754c82dd62d..b5c48def4a0b9c 100755 --- a/tools/test/test-setup.sh +++ b/tools/test/test-setup.sh @@ -102,6 +102,7 @@ export -n TEST_UNDECLARED_OUTPUTS_ANNOTATIONS if [[ -n "${TEST_TOTAL_SHARDS+x}" ]] && ((TEST_TOTAL_SHARDS != 0)); then export GTEST_SHARD_INDEX="${TEST_SHARD_INDEX}" export GTEST_TOTAL_SHARDS="${TEST_TOTAL_SHARDS}" + export GTEST_SHARD_STATUS_FILE="${TEST_SHARD_STATUS_FILE}" fi export GTEST_TMP_DIR="${TEST_TMPDIR}" diff --git a/tools/test/windows/tw.cc b/tools/test/windows/tw.cc index 8d5f61c4a3d915..011eebc6a42e6a 100644 --- a/tools/test/windows/tw.cc +++ b/tools/test/windows/tw.cc @@ -615,7 +615,10 @@ bool ExportGtestVariables(const Path& test_tmpdir) { } if (total_shards_value > 0) { std::wstring shard_index; - if (!GetEnv(L"TEST_SHARD_INDEX", &shard_index) || + std::wstring shard_status_file; + if (!GetEnv(L"TEST_SHARD_STATUS_FILE", &shard_status_file) || + !GetEnv(L"TEST_SHARD_INDEX", &shard_index) || + !SetEnv(L"GTEST_SHARD_STATUS_FILE", shard_status_file) || !SetEnv(L"GTEST_SHARD_INDEX", shard_index) || !SetEnv(L"GTEST_TOTAL_SHARDS", total_shards_str)) { return false;