File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
kani-compiler/src/kani_middle
tests/script-based-pre/cargo_autoharness_include Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ impl CodegenUnits {
9090 let ( chosen, skipped) = automatic_harness_partition (
9191 tcx,
9292 args,
93+ & crate_info. name ,
9394 * kani_fns. get ( & KaniModel :: Any . into ( ) ) . unwrap ( ) ,
9495 ) ;
9596 AUTOHARNESS_MD
@@ -360,6 +361,7 @@ fn get_all_automatic_harnesses(
360361fn automatic_harness_partition (
361362 tcx : TyCtxt ,
362363 args : & Arguments ,
364+ crate_name : & str ,
363365 kani_any_def : FnDef ,
364366) -> ( Vec < Instance > , BTreeMap < String , AutoHarnessSkipReason > ) {
365367 // If `filter_list` contains `name`, either as an exact match or a substring.
@@ -384,7 +386,8 @@ fn automatic_harness_partition(
384386 return Some ( AutoHarnessSkipReason :: NoBody ) ;
385387 }
386388
387- let name = instance. name ( ) ;
389+ // Preprend the crate name so that users can filter out entire crates using the existing function filter flags.
390+ let name = format ! ( "{crate_name}::{}" , instance. name( ) ) ;
388391 let body = instance. body ( ) . unwrap ( ) ;
389392
390393 if is_proof_harness ( tcx, instance)
Original file line number Diff line number Diff line change 22# Copyright Kani Contributors
33# SPDX-License-Identifier: Apache-2.0 OR MIT
44
5- cargo kani autoharness -Z autoharness --include-pattern include
5+ cargo kani autoharness -Z autoharness --include-pattern cargo_autoharness_include:: include
You can’t perform that action at this time.
0 commit comments