Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set GTEST_SHARD_STATUS_FILE in test setup #18469

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tools/test/test-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand Down
5 changes: 4 additions & 1 deletion tools/test/windows/tw.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down