From 34e92229590ee68405e90a74138aa3dd389375e9 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Thu, 29 Feb 2024 15:24:20 +0200 Subject: [PATCH] testing: Add long running light client flag and cfg aliases Signed-off-by: Alexandru Vasile --- testing/integration-tests/Cargo.toml | 6 ++++++ testing/integration-tests/build.rs | 9 +++++++++ 2 files changed, 15 insertions(+) create mode 100644 testing/integration-tests/build.rs diff --git a/testing/integration-tests/Cargo.toml b/testing/integration-tests/Cargo.toml index 27a2c83d9f..d52ceaa17a 100644 --- a/testing/integration-tests/Cargo.toml +++ b/testing/integration-tests/Cargo.toml @@ -18,6 +18,9 @@ default = [] # Enable to run the tests with Light Client support. unstable-light-client = ["subxt/unstable-light-client"] +# Enable to run the full-client tests with Light Client support. +unstable-light-client-long-running = ["subxt/unstable-light-client"] + # Enable this to use the unstable backend in tests _instead of_ # the default one which relies on the "old" RPC methods. unstable-backend-client = [] @@ -43,3 +46,6 @@ tracing = { workspace = true } tracing-subscriber = { workspace = true } wabt = { workspace = true } substrate-runner = { workspace = true } + +[build-dependencies] +cfg_aliases = "0.2.0" diff --git a/testing/integration-tests/build.rs b/testing/integration-tests/build.rs new file mode 100644 index 0000000000..992c3b3e81 --- /dev/null +++ b/testing/integration-tests/build.rs @@ -0,0 +1,9 @@ +use cfg_aliases::cfg_aliases; + +fn main() { + // Setup cfg aliases + cfg_aliases! { + lightclient: { any(feature = "unstable-light-client", feature = "unstable-light-client-long-running") }, + fullclient: { all(not(feature = "unstable-light-client"), not(feature = "unstable-light-client-long-running")) }, + } +}