diff --git a/BUILD.gn b/BUILD.gn index f0319a303..5514010b1 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -17,9 +17,15 @@ import("$dir_pw_unit_test/test.gni") # By default, Pigweed will build this target when invoking ninja. group("default") { deps = [ - ":pw_module_tests_run", "$dir_pigweed/docs", ] + if (pw_automatic_test_runner == "") { + # Without a test runner defined, build the tests but don't run them. + deps += [ ":pw_module_tests" ] + } else { + # With a test runner, depend on the run targets so they run with the build. + deps += [ ":pw_module_tests_run" ] + } } group("pw_facades") {