Skip to content

Commit

Permalink
fix trybuild for sp-api
Browse files Browse the repository at this point in the history
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
  • Loading branch information
ggwpez committed Sep 21, 2024
1 parent 22d8d3c commit 37f082f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions substrate/primitives/api/test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ harness = false

[features]
"enable-staging-api" = []
disable-ui-tests = []
4 changes: 4 additions & 0 deletions substrate/primitives/api/test/tests/trybuild.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use std::env;

#[rustversion::attr(not(stable), ignore)]
#[cfg(not(feature = "disable-ui-tests"))]
#[test]
fn ui() {
// Only run the ui tests when `RUN_UI_TESTS` is set.
Expand All @@ -28,6 +29,9 @@ fn ui() {
// As trybuild is using `cargo check`, we don't need the real WASM binaries.
env::set_var("SKIP_WASM_BUILD", "1");

// Warnings are part of our UI.
std::env::set_var("RUSTFLAGS", "--deny warnings");

let t = trybuild::TestCases::new();
t.compile_fail("tests/ui/*.rs");
t.pass("tests/ui/positive_cases/*.rs");
Expand Down

0 comments on commit 37f082f

Please sign in to comment.