mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-24 22:55:43 +00:00
PVF: Add worker check during tests and benches (#1771)
This commit is contained in:
@@ -37,6 +37,5 @@ tempfile = "3.3.0"
|
||||
|
||||
[features]
|
||||
# This feature is used to export test code to other crates without putting it in the production build.
|
||||
# Also used for building the puppet worker.
|
||||
test-utils = []
|
||||
jemalloc-allocator = []
|
||||
|
||||
@@ -35,9 +35,14 @@ use tokio::{io, runtime::Runtime};
|
||||
/// spawning the desired worker.
|
||||
#[macro_export]
|
||||
macro_rules! decl_worker_main {
|
||||
($expected_command:expr, $entrypoint:expr, $worker_version:expr $(,)*) => {
|
||||
($expected_command:expr, $entrypoint:expr, $worker_version:expr, $worker_version_hash:expr $(,)*) => {
|
||||
fn get_full_version() -> String {
|
||||
format!("{}-{}", $worker_version, $worker_version_hash)
|
||||
}
|
||||
|
||||
fn print_help(expected_command: &str) {
|
||||
println!("{} {}", expected_command, $worker_version);
|
||||
println!("commit: {}", $worker_version_hash);
|
||||
println!();
|
||||
println!("PVF worker that is called by polkadot.");
|
||||
}
|
||||
@@ -67,6 +72,11 @@ macro_rules! decl_worker_main {
|
||||
println!("{}", $worker_version);
|
||||
return
|
||||
},
|
||||
// Useful for debugging. --version is used for version checks.
|
||||
"--full-version" => {
|
||||
println!("{}", get_full_version());
|
||||
return
|
||||
},
|
||||
|
||||
"--check-can-enable-landlock" => {
|
||||
#[cfg(target_os = "linux")]
|
||||
|
||||
Reference in New Issue
Block a user