Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

pvf: use test-utils feature to export test only #7538

Prev Previous commit
Next Next commit
remove required features from prepare and executing
jpserrat committed Aug 9, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 6c46d317ecc2ab8055481d5d1045a47b46c0fffc
8 changes: 2 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -5,12 +5,10 @@ path = "src/main.rs"
[[bin]]
name = "polkadot-execute-worker"
path = "src/bin/execute-worker.rs"
required-features = ["test-utils"]

[[bin]]
name = "polkadot-prepare-worker"
path = "src/bin/prepare-worker.rs"
required-features = ["test-utils"]

[package]
name = "polkadot"
@@ -40,8 +38,8 @@ polkadot-node-core-pvf-prepare-worker = { path = "node/core/pvf/prepare-worker"
polkadot-overseer = { path = "node/overseer" }

# Needed for worker binaries.
polkadot-node-core-pvf-common = { path = "node/core/pvf/common", features = ["test-utils"], optional = true }
polkadot-node-core-pvf-execute-worker = { path = "node/core/pvf/execute-worker", optional = true }
polkadot-node-core-pvf-common = { path = "node/core/pvf/common", features = ["test-utils"] }
polkadot-node-core-pvf-execute-worker = { path = "node/core/pvf/execute-worker" }

[dev-dependencies]
assert_cmd = "2.0.4"
@@ -228,8 +226,6 @@ fast-runtime = [ "polkadot-cli/fast-runtime" ]
runtime-metrics = [ "polkadot-cli/runtime-metrics" ]
pyroscope = ["polkadot-cli/pyroscope"]
jemalloc-allocator = ["polkadot-node-core-pvf-prepare-worker/jemalloc-allocator", "polkadot-overseer/jemalloc-allocator"]
# Needed for worker binaries.
test-utils = ["polkadot-node-core-pvf-common/test-utils", "polkadot-node-core-pvf-execute-worker"]
# Enables timeout-based tests supposed to be run only in CI environment as they may be flaky
# when run locally depending on system load
ci-only-tests = ["polkadot-node-core-pvf/ci-only-tests"]
2 changes: 0 additions & 2 deletions node/malus/Cargo.toml
Original file line number Diff line number Diff line change
@@ -17,13 +17,11 @@ path = "src/malus.rs"
[[bin]]
name = "polkadot-execute-worker"
path = "../../src/bin/execute-worker.rs"
required-features = ["test-utils"]
# Prevent rustdoc error. Already documented from top-level Cargo.toml.
doc = false
[[bin]]
name = "polkadot-prepare-worker"
path = "../../src/bin/prepare-worker.rs"
required-features = ["test-utils"]
# Prevent rustdoc error. Already documented from top-level Cargo.toml.
doc = false

2 changes: 1 addition & 1 deletion scripts/ci/gitlab/pipeline/test.yml
Original file line number Diff line number Diff line change
@@ -90,7 +90,7 @@ test-node-metrics:
RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings"
script:
# Build the required workers.
- cargo build --bin polkadot-execute-worker --bin polkadot-prepare-worker --profile testnet --verbose --locked --features=test-utils
- cargo build --bin polkadot-execute-worker --bin polkadot-prepare-worker --profile testnet --verbose --locked
# Run tests.
- time cargo test --profile testnet --verbose --locked --features=runtime-metrics -p polkadot-node-metrics