Skip to content

Commit 402003b

Browse files
committed
bin/run: add a --coverage argument
So that one can conveniently locally run environmentd or sqllogictest with coverage.
1 parent cccca25 commit 402003b

File tree

1 file changed

+7
-0
lines changed
  • misc/python/materialize/cli

1 file changed

+7
-0
lines changed

misc/python/materialize/cli/run.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ def main() -> int:
114114
help="Disables the limited codesigning we do on macOS to support Instruments",
115115
action="store_true",
116116
)
117+
parser.add_argument(
118+
"--coverage",
119+
help="Build with coverage",
120+
action="store_true",
121+
)
117122
args = parser.parse_intermixed_args()
118123

119124
# Handle `+toolchain` like rustup.
@@ -262,6 +267,8 @@ def _build(args: argparse.Namespace, extra_programs: list[str] = []) -> int:
262267
if args.tokio_console:
263268
features += ["tokio-console"]
264269
env["RUSTFLAGS"] = env.get("RUSTFLAGS", "") + " --cfg=tokio_unstable"
270+
if args.coverage:
271+
env["RUSTFLAGS"] = env.get("RUSTFLAGS", "") + " -Cinstrument-coverage"
265272
if args.features:
266273
features.extend(args.features.split(","))
267274
if features:

0 commit comments

Comments
 (0)