diff --git a/spin/cmds/meson.py b/spin/cmds/meson.py index 07ef965..27671e1 100644 --- a/spin/cmds/meson.py +++ b/spin/cmds/meson.py @@ -433,7 +433,10 @@ def test( click.secho( "Invoking `build` prior to running tests:", bold=True, fg="bright_green" ) - ctx.invoke(build_cmd, gcov=bool(gcov)) + if gcov is not None: + ctx.invoke(build_cmd, gcov=bool(gcov)) + else: + ctx.invoke(build_cmd) package = cfg.get("tool.spin.package", None) if (not pytest_args) and (not tests):