File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -187,6 +187,7 @@ pub enum CargoAction {
187
187
Build ,
188
188
Clippy ,
189
189
Coverage {
190
+ lcov : bool ,
190
191
open : bool ,
191
192
} ,
192
193
Doc {
@@ -254,9 +255,13 @@ impl Cargo {
254
255
tool_args. extend ( [ "-D" , "warnings" ] ) ;
255
256
}
256
257
}
257
- CargoAction :: Coverage { open } => {
258
+ CargoAction :: Coverage { lcov , open } => {
258
259
action = "llvm-cov" ;
259
- extra_args. push ( "--html" ) ;
260
+ if lcov {
261
+ extra_args. extend ( [ "--lcov" , "--output-path" , "target/lcov" ] ) ;
262
+ } else {
263
+ extra_args. push ( "--html" ) ;
264
+ }
260
265
if open {
261
266
extra_args. push ( "--open" ) ;
262
267
}
Original file line number Diff line number Diff line change @@ -89,7 +89,10 @@ fn clippy(opt: &ClippyOpt) -> Result<()> {
89
89
fn code_coverage ( opt : & CovOpt ) -> Result < ( ) > {
90
90
if has_cmd ( "cargo-llvm-cov" ) {
91
91
let cargo = Cargo {
92
- action : CargoAction :: Coverage { open : opt. open } ,
92
+ action : CargoAction :: Coverage {
93
+ lcov : opt. lcov ,
94
+ open : opt. open ,
95
+ } ,
93
96
features : Feature :: more_code ( * opt. unstable , false ) ,
94
97
// Leave out uefi-macros; the compilation tests will just make
95
98
// things slower without contributing anything to the coverage
Original file line number Diff line number Diff line change @@ -113,6 +113,10 @@ pub struct CovOpt {
113
113
#[ clap( long, action) ]
114
114
pub open : bool ,
115
115
116
+ /// Output raw lcov data instead of HTML.
117
+ #[ clap( long, action, conflicts_with = "open" ) ]
118
+ pub lcov : bool ,
119
+
116
120
#[ clap( flatten) ]
117
121
pub unstable : UnstableOpt ,
118
122
}
You can’t perform that action at this time.
0 commit comments