File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ use rustc_version::{version_meta, Channel};
22
33fn main ( ) {
44 println ! ( "cargo::rustc-check-cfg=cfg(CHANNEL_NIGHTLY)" ) ;
5+ println ! ( "cargo::rustc-check-cfg=cfg(NOT_CI)" ) ;
56
67 // Set cfg flags depending on release channel
78 let channel = match version_meta ( ) . unwrap ( ) . channel {
@@ -10,5 +11,10 @@ fn main() {
1011 Channel :: Nightly => "CHANNEL_NIGHTLY" ,
1112 Channel :: Dev => "CHANNEL_DEV" ,
1213 } ;
13- println ! ( "cargo:rustc-cfg={}" , channel)
14+ println ! ( "cargo:rustc-cfg={}" , channel) ;
15+ if option_env ! ( "CI" ) . is_some ( ) {
16+ println ! ( "cargo:rustc-cfg={}" , "CI" )
17+ } else {
18+ println ! ( "cargo:rustc-cfg={}" , "NOT_CI" )
19+ }
1420}
Original file line number Diff line number Diff line change 11use anyhow:: Result ;
22
3- #[ cfg( feature = "clipboard" ) ]
3+ #[ cfg( all ( feature = "clipboard" , NOT_CI ) ) ]
44#[ tokio:: test]
55async fn clipboard ( ) -> Result < ( ) > {
66 // NOTE: we must run these tests in serial
You can’t perform that action at this time.
0 commit comments