Skip to content

Commit

Permalink
Disable clipboard tests in CI.
Browse files Browse the repository at this point in the history
As Linux cannot access X11 and therefore the clipboard tests would fail.
  • Loading branch information
tmpfs committed Oct 20, 2024
1 parent 4daf9aa commit 7ca555b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion crates/account_extras/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use rustc_version::{version_meta, Channel};

fn main() {
println!("cargo::rustc-check-cfg=cfg(CHANNEL_NIGHTLY)");
println!("cargo::rustc-check-cfg=cfg(NOT_CI)");

// Set cfg flags depending on release channel
let channel = match version_meta().unwrap().channel {
Expand All @@ -10,5 +11,10 @@ fn main() {
Channel::Nightly => "CHANNEL_NIGHTLY",
Channel::Dev => "CHANNEL_DEV",
};
println!("cargo:rustc-cfg={}", channel)
println!("cargo:rustc-cfg={}", channel);
if option_env!("CI").is_some() {
println!("cargo:rustc-cfg={}", "CI")
} else {
println!("cargo:rustc-cfg={}", "NOT_CI")
}
}
2 changes: 1 addition & 1 deletion crates/account_extras/tests/clipboard.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use anyhow::Result;

#[cfg(feature = "clipboard")]
#[cfg(all(feature = "clipboard", NOT_CI))]
#[tokio::test]
async fn clipboard() -> Result<()> {
// NOTE: we must run these tests in serial
Expand Down

0 comments on commit 7ca555b

Please sign in to comment.