Skip to content

Commit

Permalink
[7.5.0] Remove empty coverage environment
Browse files Browse the repository at this point in the history
Fixes bazelbuild#23247

Closes bazelbuild#24768

PiperOrigin-RevId: 707176116
Change-Id: I71ef3c630f8130467cc6a0c730c1278ae6b0817f
(cherry picked from commit 03eae37)
  • Loading branch information
keith committed Jan 6, 2025
1 parent 2ffb963 commit 4c1eb16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/main/starlark/builtins_bzl/common/cc/cc_helper.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,7 @@ def _get_coverage_environment(ctx, cc_config, cc_toolchain):
}
for k in list(env.keys()):
if env[k] == None:
env[k] = ""
env.pop(k)
if cc_config.fdo_instrument():
env["FDO_DIR"] = cc_config.fdo_instrument()
return env
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ public void testGcovNotDefined() throws Exception {
break;
}
}
assertThat(gcovPath).isEmpty();
assertThat(gcovPath).isNull();
}

@Test
Expand Down Expand Up @@ -471,10 +471,8 @@ public void testLlvmCoverageToolsNotDefined() throws Exception {
}
}

assertThat(llvmCov).isNotNull();
assertThat(llvmCov).isEmpty();
assertThat(llvmProfdata).isNotNull();
assertThat(llvmProfdata).isEmpty();
assertThat(llvmCov).isNull();
assertThat(llvmProfdata).isNull();
}

@Test
Expand Down

0 comments on commit 4c1eb16

Please sign in to comment.