mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-24 18:21:08 +00:00
pvf: use test-utils feature to export test only (#7538)
* pvf: use test-utils feature to export test only * adding comment to test-utils feature * make prepare-worker and execute-worker as optional dependencies and add comments to test-utils * remove doc hidden from pvf testing * add prepare worker and execute worker entrypoints to test-utils feature * pvf: add sp_tracing as optional dependency of test-utils * add test-utils for polkadot and malus * add test-utils feature to prepare and execute workers script * remove required features from prepare and executing * Try to trigger CI again to fix broken jobs --------- Co-authored-by: Marcin S <marcin@realemail.net>
This commit is contained in:
@@ -26,7 +26,7 @@ pub mod worker;
|
||||
pub use cpu_time::ProcessTime;
|
||||
|
||||
// Used by `decl_worker_main!`.
|
||||
#[doc(hidden)]
|
||||
#[cfg(feature = "test-utils")]
|
||||
pub use sp_tracing;
|
||||
|
||||
const LOG_TARGET: &str = "parachain::pvf-common";
|
||||
@@ -34,7 +34,7 @@ const LOG_TARGET: &str = "parachain::pvf-common";
|
||||
use std::mem;
|
||||
use tokio::io::{self, AsyncRead, AsyncReadExt as _, AsyncWrite, AsyncWriteExt as _};
|
||||
|
||||
#[doc(hidden)]
|
||||
#[cfg(feature = "test-utils")]
|
||||
pub mod tests {
|
||||
use std::time::Duration;
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ impl PvfPrepData {
|
||||
}
|
||||
|
||||
/// Creates a structure for tests.
|
||||
#[doc(hidden)]
|
||||
#[cfg(feature = "test-utils")]
|
||||
pub fn from_discriminator_and_timeout(num: u32, timeout: Duration) -> Self {
|
||||
let descriminator_buf = num.to_le_bytes().to_vec();
|
||||
Self::from_code(
|
||||
@@ -96,13 +96,13 @@ impl PvfPrepData {
|
||||
}
|
||||
|
||||
/// Creates a structure for tests.
|
||||
#[doc(hidden)]
|
||||
#[cfg(feature = "test-utils")]
|
||||
pub fn from_discriminator(num: u32) -> Self {
|
||||
Self::from_discriminator_and_timeout(num, crate::tests::TEST_PREPARATION_TIMEOUT)
|
||||
}
|
||||
|
||||
/// Creates a structure for tests.
|
||||
#[doc(hidden)]
|
||||
#[cfg(feature = "test-utils")]
|
||||
pub fn from_discriminator_precheck(num: u32) -> Self {
|
||||
let mut pvf =
|
||||
Self::from_discriminator_and_timeout(num, crate::tests::TEST_PREPARATION_TIMEOUT);
|
||||
|
||||
Reference in New Issue
Block a user