diff --git a/code/Cargo.lock b/code/Cargo.lock index a8e8cdb80..c21c5bd48 100644 --- a/code/Cargo.lock +++ b/code/Cargo.lock @@ -2786,30 +2786,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "malachite-cli" -version = "0.1.0" -dependencies = [ - "axum", - "bytesize", - "clap", - "color-eyre", - "directories", - "itertools 0.13.0", - "malachite-app", - "malachite-config", - "malachite-core-types", - "malachite-metrics", - "rand", - "serde_json", - "thiserror 2.0.6", - "tokio", - "toml", - "tracing", - "tracing-appender", - "tracing-subscriber", -] - [[package]] name = "malachite-codec" version = "0.1.0" @@ -3024,9 +3000,9 @@ version = "0.1.0" dependencies = [ "clap", "color-eyre", - "malachite-cli", "malachite-config", "malachite-starknet-host", + "malachite-test-cli", "tempfile", "tikv-jemallocator", "tracing", @@ -3044,7 +3020,6 @@ dependencies = [ "itertools 0.13.0", "libp2p-identity", "malachite-app", - "malachite-cli", "malachite-codec", "malachite-config", "malachite-consensus", @@ -3057,6 +3032,7 @@ dependencies = [ "malachite-starknet-p2p-proto", "malachite-starknet-p2p-types", "malachite-sync", + "malachite-test-cli", "malachite-test-mempool", "prost", "ractor", @@ -3164,6 +3140,30 @@ dependencies = [ "signature", ] +[[package]] +name = "malachite-test-cli" +version = "0.1.0" +dependencies = [ + "axum", + "bytesize", + "clap", + "color-eyre", + "directories", + "itertools 0.13.0", + "malachite-app", + "malachite-config", + "malachite-core-types", + "malachite-metrics", + "rand", + "serde_json", + "thiserror 2.0.6", + "tokio", + "toml", + "tracing", + "tracing-appender", + "tracing-subscriber", +] + [[package]] name = "malachite-test-mbt" version = "0.1.0" diff --git a/code/Cargo.toml b/code/Cargo.toml index 38d9799ab..9e3ba9d19 100644 --- a/code/Cargo.toml +++ b/code/Cargo.toml @@ -4,7 +4,6 @@ resolver = "2" members = [ "crates/app", "crates/app-channel", - "crates/cli", "crates/codec", "crates/config", "crates/consensus", @@ -26,6 +25,7 @@ members = [ # Test "crates/test", + "crates/test/cli", "crates/test/mbt", "crates/test/mempool", "crates/network/test", @@ -62,7 +62,7 @@ debug = true malachite-engine = { version = "0.1.0", path = "crates/engine" } malachite-app = { version = "0.1.0", path = "crates/app" } malachite-app-channel = { version = "0.1.0", path = "crates/app-channel" } -malachite-cli = { version = "0.1.0", path = "crates/cli" } +malachite-test-cli = { version = "0.1.0", path = "crates/test/cli" } malachite-codec = { version = "0.1.0", path = "crates/codec" } malachite-config = { version = "0.1.0", path = "crates/config" } malachite-consensus = { version = "0.1.0", path = "crates/consensus" } diff --git a/code/crates/starknet/app/Cargo.toml b/code/crates/starknet/app/Cargo.toml index 84905003c..6a2aab6a6 100644 --- a/code/crates/starknet/app/Cargo.toml +++ b/code/crates/starknet/app/Cargo.toml @@ -11,7 +11,7 @@ publish = false workspace = true [dependencies] -malachite-cli = { workspace = true } +malachite-test-cli = { workspace = true } malachite-config = { workspace = true } malachite-starknet-host = { workspace = true } diff --git a/code/crates/starknet/app/src/main.rs b/code/crates/starknet/app/src/main.rs index 535b5a7c9..bdd1f4dc6 100644 --- a/code/crates/starknet/app/src/main.rs +++ b/code/crates/starknet/app/src/main.rs @@ -1,7 +1,7 @@ use color_eyre::eyre::eyre; -use malachite_cli::args::{Args, Commands}; -use malachite_cli::{logging, runtime}; use malachite_starknet_host::node::StarknetNode; +use malachite_test_cli::args::{Args, Commands}; +use malachite_test_cli::{logging, runtime}; use tracing::{error, info, trace}; // Use jemalloc on Linux @@ -103,10 +103,10 @@ mod tests { use clap::Parser; use color_eyre::eyre; use color_eyre::eyre::eyre; - use malachite_cli::args::{Args, Commands}; - use malachite_cli::cmd::init::*; use malachite_config::LoggingConfig; use malachite_starknet_host::node::StarknetNode; + use malachite_test_cli::args::{Args, Commands}; + use malachite_test_cli::cmd::init::*; #[test] fn running_init_creates_config_files() -> eyre::Result<()> { diff --git a/code/crates/starknet/host/Cargo.toml b/code/crates/starknet/host/Cargo.toml index ec31f831b..47e993ee9 100644 --- a/code/crates/starknet/host/Cargo.toml +++ b/code/crates/starknet/host/Cargo.toml @@ -46,4 +46,4 @@ workspace = true [dev-dependencies] tempfile.workspace = true -malachite-cli.workspace = true +malachite-test-cli.workspace = true diff --git a/code/crates/starknet/host/src/node.rs b/code/crates/starknet/host/src/node.rs index db6558e45..23bd0fa52 100644 --- a/code/crates/starknet/host/src/node.rs +++ b/code/crates/starknet/host/src/node.rs @@ -179,7 +179,7 @@ fn test_starknet_node() { }; // Create configuration files - use malachite_cli::*; + use malachite_test_cli::*; let priv_keys = new::generate_private_keys(&node, 1, true); let pub_keys = priv_keys.iter().map(|pk| node.get_public_key(pk)).collect(); @@ -197,7 +197,7 @@ fn test_starknet_node() { // Run the node for a few seconds const TIMEOUT: u64 = 3; use tokio::time::{timeout, Duration}; - let rt = malachite_cli::runtime::build_runtime(node.config.runtime).unwrap(); + let rt = malachite_test_cli::runtime::build_runtime(node.config.runtime).unwrap(); let result = rt.block_on(async { timeout(Duration::from_secs(TIMEOUT), node.run()).await }); // Check that the node did not quit before the timeout. diff --git a/code/crates/cli/Cargo.toml b/code/crates/test/cli/Cargo.toml similarity index 95% rename from code/crates/cli/Cargo.toml rename to code/crates/test/cli/Cargo.toml index 4dcbc4bd6..d0313a7e3 100644 --- a/code/crates/cli/Cargo.toml +++ b/code/crates/test/cli/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "malachite-cli" +name = "malachite-test-cli" version.workspace = true edition.workspace = true repository.workspace = true diff --git a/code/crates/cli/src/args.rs b/code/crates/test/cli/src/args.rs similarity index 100% rename from code/crates/cli/src/args.rs rename to code/crates/test/cli/src/args.rs diff --git a/code/crates/cli/src/cmd/distributed_testnet.rs b/code/crates/test/cli/src/cmd/distributed_testnet.rs similarity index 100% rename from code/crates/cli/src/cmd/distributed_testnet.rs rename to code/crates/test/cli/src/cmd/distributed_testnet.rs diff --git a/code/crates/cli/src/cmd/init.rs b/code/crates/test/cli/src/cmd/init.rs similarity index 100% rename from code/crates/cli/src/cmd/init.rs rename to code/crates/test/cli/src/cmd/init.rs diff --git a/code/crates/cli/src/cmd/mod.rs b/code/crates/test/cli/src/cmd/mod.rs similarity index 100% rename from code/crates/cli/src/cmd/mod.rs rename to code/crates/test/cli/src/cmd/mod.rs diff --git a/code/crates/cli/src/cmd/start.rs b/code/crates/test/cli/src/cmd/start.rs similarity index 100% rename from code/crates/cli/src/cmd/start.rs rename to code/crates/test/cli/src/cmd/start.rs diff --git a/code/crates/cli/src/cmd/testnet.rs b/code/crates/test/cli/src/cmd/testnet.rs similarity index 100% rename from code/crates/cli/src/cmd/testnet.rs rename to code/crates/test/cli/src/cmd/testnet.rs diff --git a/code/crates/cli/src/error.rs b/code/crates/test/cli/src/error.rs similarity index 100% rename from code/crates/cli/src/error.rs rename to code/crates/test/cli/src/error.rs diff --git a/code/crates/cli/src/file.rs b/code/crates/test/cli/src/file.rs similarity index 100% rename from code/crates/cli/src/file.rs rename to code/crates/test/cli/src/file.rs diff --git a/code/crates/cli/src/lib.rs b/code/crates/test/cli/src/lib.rs similarity index 100% rename from code/crates/cli/src/lib.rs rename to code/crates/test/cli/src/lib.rs diff --git a/code/crates/cli/src/logging.rs b/code/crates/test/cli/src/logging.rs similarity index 100% rename from code/crates/cli/src/logging.rs rename to code/crates/test/cli/src/logging.rs diff --git a/code/crates/cli/src/metrics.rs b/code/crates/test/cli/src/metrics.rs similarity index 100% rename from code/crates/cli/src/metrics.rs rename to code/crates/test/cli/src/metrics.rs diff --git a/code/crates/cli/src/new.rs b/code/crates/test/cli/src/new.rs similarity index 100% rename from code/crates/cli/src/new.rs rename to code/crates/test/cli/src/new.rs diff --git a/code/crates/cli/src/runtime.rs b/code/crates/test/cli/src/runtime.rs similarity index 100% rename from code/crates/cli/src/runtime.rs rename to code/crates/test/cli/src/runtime.rs