Skip to content

Commit da41935

Browse files
committed
fix wd-test test coverage reporting
1 parent 87abde7 commit da41935

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

build/wd_test.bzl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,11 +282,14 @@ _wd_test = rule(
282282
),
283283
# Source file
284284
"src": attr.label(allow_single_file = True),
285-
# The workerd executable is used to run all tests
285+
# The workerd executable is used to run all tests.
286+
# IMPORTANT: cfg must be "target" (not "exec") for coverage instrumentation to work.
287+
# When cfg="exec", the binary is built for the execution platform without coverage
288+
# instrumentation. Coverage instrumentation is only applied to target platform builds.
286289
"workerd": attr.label(
287290
allow_single_file = True,
288291
executable = True,
289-
cfg = "exec",
292+
cfg = "target",
290293
default = "//src/workerd/server:workerd_cross",
291294
),
292295
# A list of files that this test requires to be present in order to run.

0 commit comments

Comments
 (0)