From a4bb8cbfe6c56b5ce4b7241cda4bd650598402f0 Mon Sep 17 00:00:00 2001 From: David Pacheco Date: Thu, 21 Sep 2023 11:30:32 -0700 Subject: [PATCH 1/3] consolidate omicron-dev, omdb, and xtask into "dev-tools" directory --- Cargo.toml | 14 +++++++------- {omdb => dev-tools/omdb}/Cargo.toml | 0 dev-tools/{ => omdb}/build.rs | 0 {omdb => dev-tools/omdb}/src/bin/omdb/db.rs | 0 {omdb => dev-tools/omdb}/src/bin/omdb/main.rs | 0 {omdb => dev-tools/omdb}/src/bin/omdb/nexus.rs | 0 .../omdb}/src/bin/omdb/sled_agent.rs | 0 {omdb => dev-tools/omdb}/tests/config.test.toml | 0 {omdb => dev-tools/omdb}/tests/env.out | 0 {omdb => dev-tools/omdb}/tests/successes.out | 0 {omdb => dev-tools/omdb}/tests/test_all_output.rs | 0 {omdb => dev-tools/omdb}/tests/usage_errors.out | 0 dev-tools/{ => omicron-dev}/Cargo.toml | 2 +- {omdb => dev-tools/omicron-dev}/build.rs | 0 dev-tools/{ => omicron-dev}/src/bin/omicron-dev.rs | 0 .../tests/output/cmd-omicron-dev-bad-cmd-stderr | 0 .../tests/output/cmd-omicron-dev-bad-cmd-stdout | 0 .../cmd-omicron-dev-db-populate-noargs-stderr | 0 .../cmd-omicron-dev-db-populate-noargs-stdout | 0 .../output/cmd-omicron-dev-db-wipe-noargs-stderr | 0 .../output/cmd-omicron-dev-db-wipe-noargs-stdout | 0 .../tests/output/cmd-omicron-dev-noargs-stderr | 0 .../tests/output/cmd-omicron-dev-noargs-stdout | 0 .../{ => omicron-dev}/tests/test_omicron_dev.rs | 0 {xtask => dev-tools/xtask}/Cargo.toml | 0 {xtask => dev-tools/xtask}/src/main.rs | 0 26 files changed, 8 insertions(+), 8 deletions(-) rename {omdb => dev-tools/omdb}/Cargo.toml (100%) rename dev-tools/{ => omdb}/build.rs (100%) rename {omdb => dev-tools/omdb}/src/bin/omdb/db.rs (100%) rename {omdb => dev-tools/omdb}/src/bin/omdb/main.rs (100%) rename {omdb => dev-tools/omdb}/src/bin/omdb/nexus.rs (100%) rename {omdb => dev-tools/omdb}/src/bin/omdb/sled_agent.rs (100%) rename {omdb => dev-tools/omdb}/tests/config.test.toml (100%) rename {omdb => dev-tools/omdb}/tests/env.out (100%) rename {omdb => dev-tools/omdb}/tests/successes.out (100%) rename {omdb => dev-tools/omdb}/tests/test_all_output.rs (100%) rename {omdb => dev-tools/omdb}/tests/usage_errors.out (100%) rename dev-tools/{ => omicron-dev}/Cargo.toml (97%) rename {omdb => dev-tools/omicron-dev}/build.rs (100%) rename dev-tools/{ => omicron-dev}/src/bin/omicron-dev.rs (100%) rename dev-tools/{ => omicron-dev}/tests/output/cmd-omicron-dev-bad-cmd-stderr (100%) rename dev-tools/{ => omicron-dev}/tests/output/cmd-omicron-dev-bad-cmd-stdout (100%) rename dev-tools/{ => omicron-dev}/tests/output/cmd-omicron-dev-db-populate-noargs-stderr (100%) rename dev-tools/{ => omicron-dev}/tests/output/cmd-omicron-dev-db-populate-noargs-stdout (100%) rename dev-tools/{ => omicron-dev}/tests/output/cmd-omicron-dev-db-wipe-noargs-stderr (100%) rename dev-tools/{ => omicron-dev}/tests/output/cmd-omicron-dev-db-wipe-noargs-stdout (100%) rename dev-tools/{ => omicron-dev}/tests/output/cmd-omicron-dev-noargs-stderr (100%) rename dev-tools/{ => omicron-dev}/tests/output/cmd-omicron-dev-noargs-stdout (100%) rename dev-tools/{ => omicron-dev}/tests/test_omicron_dev.rs (100%) rename {xtask => dev-tools/xtask}/Cargo.toml (100%) rename {xtask => dev-tools/xtask}/src/main.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 65caa502f8..cadf7dc367 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,9 @@ members = [ "common", "ddm-admin-client", "deploy", - "dev-tools", + "dev-tools/omdb", + "dev-tools/omicron-dev", + "dev-tools/xtask", "dns-server", "dns-service-client", "dpd-client", @@ -37,7 +39,6 @@ members = [ "nexus/test-utils-macros", "nexus/test-utils", "nexus/types", - "omdb", "oxide-client", "oximeter-client", "oximeter/collector", @@ -62,7 +63,6 @@ members = [ "wicket", "wicketd-client", "wicketd", - "xtask", ] default-members = [ @@ -74,7 +74,9 @@ default-members = [ "ddm-admin-client", "dpd-client", "deploy", - "dev-tools", + "dev-tools/omdb", + "dev-tools/omicron-dev", + "dev-tools/xtask", "dns-server", "dns-service-client", "gateway", @@ -98,7 +100,6 @@ default-members = [ "nexus/db-queries", "nexus/defaults", "nexus/types", - "omdb", "oxide-client", "oximeter-client", "oximeter/collector", @@ -123,7 +124,6 @@ default-members = [ "wicket-dbg", "wicketd", "wicketd-client", - "xtask", ] resolver = "2" @@ -234,7 +234,7 @@ nexus-types = { path = "nexus/types" } num-integer = "0.1.45" num = { version = "0.4.1", default-features = false, features = [ "libm" ] } omicron-common = { path = "common" } -omicron-dev-tools = { path = "dev-tools" } +omicron-dev = { path = "dev-tools/omicron-dev" } omicron-gateway = { path = "gateway" } omicron-nexus = { path = "nexus" } omicron-omdb = { path = "omdb" } diff --git a/omdb/Cargo.toml b/dev-tools/omdb/Cargo.toml similarity index 100% rename from omdb/Cargo.toml rename to dev-tools/omdb/Cargo.toml diff --git a/dev-tools/build.rs b/dev-tools/omdb/build.rs similarity index 100% rename from dev-tools/build.rs rename to dev-tools/omdb/build.rs diff --git a/omdb/src/bin/omdb/db.rs b/dev-tools/omdb/src/bin/omdb/db.rs similarity index 100% rename from omdb/src/bin/omdb/db.rs rename to dev-tools/omdb/src/bin/omdb/db.rs diff --git a/omdb/src/bin/omdb/main.rs b/dev-tools/omdb/src/bin/omdb/main.rs similarity index 100% rename from omdb/src/bin/omdb/main.rs rename to dev-tools/omdb/src/bin/omdb/main.rs diff --git a/omdb/src/bin/omdb/nexus.rs b/dev-tools/omdb/src/bin/omdb/nexus.rs similarity index 100% rename from omdb/src/bin/omdb/nexus.rs rename to dev-tools/omdb/src/bin/omdb/nexus.rs diff --git a/omdb/src/bin/omdb/sled_agent.rs b/dev-tools/omdb/src/bin/omdb/sled_agent.rs similarity index 100% rename from omdb/src/bin/omdb/sled_agent.rs rename to dev-tools/omdb/src/bin/omdb/sled_agent.rs diff --git a/omdb/tests/config.test.toml b/dev-tools/omdb/tests/config.test.toml similarity index 100% rename from omdb/tests/config.test.toml rename to dev-tools/omdb/tests/config.test.toml diff --git a/omdb/tests/env.out b/dev-tools/omdb/tests/env.out similarity index 100% rename from omdb/tests/env.out rename to dev-tools/omdb/tests/env.out diff --git a/omdb/tests/successes.out b/dev-tools/omdb/tests/successes.out similarity index 100% rename from omdb/tests/successes.out rename to dev-tools/omdb/tests/successes.out diff --git a/omdb/tests/test_all_output.rs b/dev-tools/omdb/tests/test_all_output.rs similarity index 100% rename from omdb/tests/test_all_output.rs rename to dev-tools/omdb/tests/test_all_output.rs diff --git a/omdb/tests/usage_errors.out b/dev-tools/omdb/tests/usage_errors.out similarity index 100% rename from omdb/tests/usage_errors.out rename to dev-tools/omdb/tests/usage_errors.out diff --git a/dev-tools/Cargo.toml b/dev-tools/omicron-dev/Cargo.toml similarity index 97% rename from dev-tools/Cargo.toml rename to dev-tools/omicron-dev/Cargo.toml index 4a7c25b337..2061489cbb 100644 --- a/dev-tools/Cargo.toml +++ b/dev-tools/omicron-dev/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "omicron-dev-tools" +name = "omicron-dev" version = "0.1.0" edition = "2021" license = "MPL-2.0" diff --git a/omdb/build.rs b/dev-tools/omicron-dev/build.rs similarity index 100% rename from omdb/build.rs rename to dev-tools/omicron-dev/build.rs diff --git a/dev-tools/src/bin/omicron-dev.rs b/dev-tools/omicron-dev/src/bin/omicron-dev.rs similarity index 100% rename from dev-tools/src/bin/omicron-dev.rs rename to dev-tools/omicron-dev/src/bin/omicron-dev.rs diff --git a/dev-tools/tests/output/cmd-omicron-dev-bad-cmd-stderr b/dev-tools/omicron-dev/tests/output/cmd-omicron-dev-bad-cmd-stderr similarity index 100% rename from dev-tools/tests/output/cmd-omicron-dev-bad-cmd-stderr rename to dev-tools/omicron-dev/tests/output/cmd-omicron-dev-bad-cmd-stderr diff --git a/dev-tools/tests/output/cmd-omicron-dev-bad-cmd-stdout b/dev-tools/omicron-dev/tests/output/cmd-omicron-dev-bad-cmd-stdout similarity index 100% rename from dev-tools/tests/output/cmd-omicron-dev-bad-cmd-stdout rename to dev-tools/omicron-dev/tests/output/cmd-omicron-dev-bad-cmd-stdout diff --git a/dev-tools/tests/output/cmd-omicron-dev-db-populate-noargs-stderr b/dev-tools/omicron-dev/tests/output/cmd-omicron-dev-db-populate-noargs-stderr similarity index 100% rename from dev-tools/tests/output/cmd-omicron-dev-db-populate-noargs-stderr rename to dev-tools/omicron-dev/tests/output/cmd-omicron-dev-db-populate-noargs-stderr diff --git a/dev-tools/tests/output/cmd-omicron-dev-db-populate-noargs-stdout b/dev-tools/omicron-dev/tests/output/cmd-omicron-dev-db-populate-noargs-stdout similarity index 100% rename from dev-tools/tests/output/cmd-omicron-dev-db-populate-noargs-stdout rename to dev-tools/omicron-dev/tests/output/cmd-omicron-dev-db-populate-noargs-stdout diff --git a/dev-tools/tests/output/cmd-omicron-dev-db-wipe-noargs-stderr b/dev-tools/omicron-dev/tests/output/cmd-omicron-dev-db-wipe-noargs-stderr similarity index 100% rename from dev-tools/tests/output/cmd-omicron-dev-db-wipe-noargs-stderr rename to dev-tools/omicron-dev/tests/output/cmd-omicron-dev-db-wipe-noargs-stderr diff --git a/dev-tools/tests/output/cmd-omicron-dev-db-wipe-noargs-stdout b/dev-tools/omicron-dev/tests/output/cmd-omicron-dev-db-wipe-noargs-stdout similarity index 100% rename from dev-tools/tests/output/cmd-omicron-dev-db-wipe-noargs-stdout rename to dev-tools/omicron-dev/tests/output/cmd-omicron-dev-db-wipe-noargs-stdout diff --git a/dev-tools/tests/output/cmd-omicron-dev-noargs-stderr b/dev-tools/omicron-dev/tests/output/cmd-omicron-dev-noargs-stderr similarity index 100% rename from dev-tools/tests/output/cmd-omicron-dev-noargs-stderr rename to dev-tools/omicron-dev/tests/output/cmd-omicron-dev-noargs-stderr diff --git a/dev-tools/tests/output/cmd-omicron-dev-noargs-stdout b/dev-tools/omicron-dev/tests/output/cmd-omicron-dev-noargs-stdout similarity index 100% rename from dev-tools/tests/output/cmd-omicron-dev-noargs-stdout rename to dev-tools/omicron-dev/tests/output/cmd-omicron-dev-noargs-stdout diff --git a/dev-tools/tests/test_omicron_dev.rs b/dev-tools/omicron-dev/tests/test_omicron_dev.rs similarity index 100% rename from dev-tools/tests/test_omicron_dev.rs rename to dev-tools/omicron-dev/tests/test_omicron_dev.rs diff --git a/xtask/Cargo.toml b/dev-tools/xtask/Cargo.toml similarity index 100% rename from xtask/Cargo.toml rename to dev-tools/xtask/Cargo.toml diff --git a/xtask/src/main.rs b/dev-tools/xtask/src/main.rs similarity index 100% rename from xtask/src/main.rs rename to dev-tools/xtask/src/main.rs From ecafa5bfe03701b9f777cb2885dd8e04a9aa1270 Mon Sep 17 00:00:00 2001 From: David Pacheco Date: Thu, 21 Sep 2023 11:42:30 -0700 Subject: [PATCH 2/3] fix build --- Cargo.lock | 2 +- dev-tools/omicron-dev/src/bin/omicron-dev.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 02f61b98b1..cfe40e849b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4860,7 +4860,7 @@ dependencies = [ ] [[package]] -name = "omicron-dev-tools" +name = "omicron-dev" version = "0.1.0" dependencies = [ "anyhow", diff --git a/dev-tools/omicron-dev/src/bin/omicron-dev.rs b/dev-tools/omicron-dev/src/bin/omicron-dev.rs index 70018e9d9b..14617d6ba4 100644 --- a/dev-tools/omicron-dev/src/bin/omicron-dev.rs +++ b/dev-tools/omicron-dev/src/bin/omicron-dev.rs @@ -327,7 +327,7 @@ async fn cmd_run_all(args: &RunAllArgs) -> Result<(), anyhow::Error> { let mut signal_stream = signals.fuse(); // Read configuration. - let config_str = include_str!("../../../nexus/examples/config.toml"); + let config_str = include_str!("../../../../nexus/examples/config.toml"); let mut config: omicron_common::nexus_config::Config = toml::from_str(config_str).context("parsing example config")?; config.pkg.log = dropshot::ConfigLogging::File { From 674719761c53503be044b3fcf29e5db8ab6530c1 Mon Sep 17 00:00:00 2001 From: David Pacheco Date: Thu, 21 Sep 2023 13:32:34 -0700 Subject: [PATCH 3/3] fix symlink --- dev-tools/omdb/tests/config.test.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-tools/omdb/tests/config.test.toml b/dev-tools/omdb/tests/config.test.toml index 9a42a12b61..6050ca47dd 120000 --- a/dev-tools/omdb/tests/config.test.toml +++ b/dev-tools/omdb/tests/config.test.toml @@ -1 +1 @@ -../../nexus/tests/config.test.toml \ No newline at end of file +../../../nexus/tests/config.test.toml \ No newline at end of file