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 {
90
90
let ( chosen, skipped) = automatic_harness_partition (
91
91
tcx,
92
92
args,
93
+ & crate_info. name ,
93
94
* kani_fns. get ( & KaniModel :: Any . into ( ) ) . unwrap ( ) ,
94
95
) ;
95
96
AUTOHARNESS_MD
@@ -360,6 +361,7 @@ fn get_all_automatic_harnesses(
360
361
fn automatic_harness_partition (
361
362
tcx : TyCtxt ,
362
363
args : & Arguments ,
364
+ crate_name : & str ,
363
365
kani_any_def : FnDef ,
364
366
) -> ( Vec < Instance > , BTreeMap < String , AutoHarnessSkipReason > ) {
365
367
// If `filter_list` contains `name`, either as an exact match or a substring.
@@ -384,7 +386,8 @@ fn automatic_harness_partition(
384
386
return Some ( AutoHarnessSkipReason :: NoBody ) ;
385
387
}
386
388
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( ) ) ;
388
391
let body = instance. body ( ) . unwrap ( ) ;
389
392
390
393
if is_proof_harness ( tcx, instance)
Original file line number Diff line number Diff line change 2
2
# Copyright Kani Contributors
3
3
# SPDX-License-Identifier: Apache-2.0 OR MIT
4
4
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