This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-0
lines changed
src/tools/rust-analyzer/crates/rust-analyzer/src Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1884,6 +1884,7 @@ impl Config {
18841884 CargoFeaturesDef :: Selected ( it) => it,
18851885 } ,
18861886 extra_args : self . extra_args ( ) . clone ( ) ,
1887+ extra_test_bin_args : self . runnables_extraTestBinaryArgs ( ) . clone ( ) ,
18871888 extra_env : self . extra_env ( ) . clone ( ) ,
18881889 target_dir : self . target_dir_from_config ( ) ,
18891890 }
@@ -1934,6 +1935,7 @@ impl Config {
19341935 CargoFeaturesDef :: Selected ( it) => it,
19351936 } ,
19361937 extra_args : self . check_extra_args ( ) ,
1938+ extra_test_bin_args : self . runnables_extraTestBinaryArgs ( ) . clone ( ) ,
19371939 extra_env : self . check_extra_env ( ) ,
19381940 target_dir : self . target_dir_from_config ( ) ,
19391941 } ,
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ pub(crate) struct CargoOptions {
3030 pub ( crate ) all_features : bool ,
3131 pub ( crate ) features : Vec < String > ,
3232 pub ( crate ) extra_args : Vec < String > ,
33+ pub ( crate ) extra_test_bin_args : Vec < String > ,
3334 pub ( crate ) extra_env : FxHashMap < String , String > ,
3435 pub ( crate ) target_dir : Option < Utf8PathBuf > ,
3536}
Original file line number Diff line number Diff line change @@ -102,6 +102,11 @@ impl CargoTestHandle {
102102 }
103103 cmd. args ( [ "-Z" , "unstable-options" ] ) ;
104104 cmd. arg ( "--format=json" ) ;
105+
106+ for extra_arg in options. extra_test_bin_args {
107+ cmd. arg ( extra_arg) ;
108+ }
109+
105110 Ok ( Self { _handle : CommandHandle :: spawn ( cmd, sender) ? } )
106111 }
107112}
You can’t perform that action at this time.
0 commit comments