Skip to content

Commit 4a0d65c

Browse files
committed
More fixes
1 parent f3945a5 commit 4a0d65c

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/main/java/com/google/devtools/build/lib/analysis/test/InstrumentedFilesInfo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public ImmutableMap<String, String> getCoverageEnvironment() {
138138
*
139139
* <p>This is useful for virtual include paths in C++, which get reported at the include location
140140
* and not the real source path. For example, the reported include source file can be
141-
* "bazel-out/k8-fastbuild/bin/include/common/_virtual_includes/strategy/strategy.h", but its
141+
* "bazel-out/k8-fastbuild/_v_inc/XXXXXXXX/strategy.h", but its
142142
* actual source path is "include/common/strategy.h".
143143
*/
144144
NestedSet<Tuple> getReportedToActualSources() {

src/main/java/com/google/devtools/build/lib/rules/cpp/CcCompilationContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public final class CcCompilationContext implements CcCompilationContextApi<Artif
8888
// Each pair maps the Bazel generated paths of virtual include headers back to their original path
8989
// relative to the workspace directory.
9090
// For example it can map
91-
// "bazel-out/k8-fastbuild/bin/include/common/_virtual_includes/strategy/strategy.h"
91+
// "bazel-out/k8-fastbuild/_v_inc/XXXXXXXX/strategy.h"
9292
// back to the path of the header in the workspace directory "include/common/strategy.h".
9393
// This is needed only when code coverage collection is enabled, to report the actual source file
9494
// name in the coverage output file.

src/test/java/com/google/devtools/build/lib/rules/cpp/CcCommonTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import static com.google.devtools.build.lib.actions.util.ActionsTestUtil.baseArtifactNames;
1919
import static com.google.devtools.build.lib.actions.util.ActionsTestUtil.baseNamesOf;
2020

21+
import com.google.common.base.Joiner;
2122
import com.google.common.collect.ImmutableList;
2223
import com.google.common.truth.IterableSubject;
2324
import com.google.devtools.build.lib.actions.Action;
@@ -1204,8 +1205,8 @@ public void testSymlinkActionIsNotRegisteredWhenIncludePrefixDoesntChangePath()
12041205

12051206
CcCompilationContext ccCompilationContext =
12061207
getConfiguredTarget("//third_party:a").get(CcInfo.PROVIDER).getCcCompilationContext();
1207-
assertThat(ActionsTestUtil.prettyArtifactNames(ccCompilationContext.getDeclaredIncludeSrcs()))
1208-
.doesNotContain("third_party/_virtual_includes/a/third_party/a.h");
1208+
assertThat(Joiner.on(" ").join(ActionsTestUtil.prettyArtifactNames(ccCompilationContext.getDeclaredIncludeSrcs())))
1209+
.doesNotContainMatch("_v_inc/[a-z0-9]{8}/third_party/a.h");
12091210
}
12101211

12111212
@Test

0 commit comments

Comments
 (0)