Skip to content

Commit

Permalink
[x] remove dependency on diem/diem-devtools
Browse files Browse the repository at this point in the history
  • Loading branch information
davidiw authored and aptos-bot committed Mar 17, 2022
1 parent d13b289 commit 7153156
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 60 deletions.
91 changes: 53 additions & 38 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions crates/aptos-workspace-hack/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ serde_json = { version = "1.0.79", features = ["indexmap", "preserve_order", "st
sha-1 = { version = "0.9.8", features = ["std"] }
standback = { version = "0.2.17", default-features = false, features = ["std"] }
subtle = { version = "2.4.1", default-features = false, features = ["std"] }
tokio = { version = "1.17.0", features = ["bytes", "fs", "full", "io-std", "io-util", "libc", "macros", "memchr", "mio", "net", "num_cpus", "once_cell", "parking_lot", "process", "rt", "rt-multi-thread", "signal", "signal-hook-registry", "socket2", "sync", "test-util", "time", "tokio-macros", "winapi"] }
tokio = { version = "1.17.0", features = ["bytes", "fs", "full", "io-std", "io-util", "libc", "macros", "memchr", "mio", "net", "num_cpus", "once_cell", "parking_lot", "process", "rt", "rt-multi-thread", "signal", "signal-hook-registry", "socket2", "sync", "test-util", "time", "tokio-macros"] }
tokio-util = { version = "0.6.9", features = ["codec", "compat", "futures-io", "io"] }
toml = { version = "0.5.8" }
tracing = { version = "0.1.32", features = ["attributes", "log", "std", "tracing-attributes"] }
Expand Down Expand Up @@ -99,7 +99,7 @@ sha-1 = { version = "0.9.8", features = ["std"] }
standback = { version = "0.2.17", default-features = false, features = ["std"] }
subtle = { version = "2.4.1", default-features = false, features = ["std"] }
syn = { version = "1.0.86", features = ["clone-impls", "derive", "extra-traits", "fold", "full", "parsing", "printing", "proc-macro", "quote", "visit", "visit-mut"] }
tokio = { version = "1.17.0", features = ["bytes", "fs", "full", "io-std", "io-util", "libc", "macros", "memchr", "mio", "net", "num_cpus", "once_cell", "parking_lot", "process", "rt", "rt-multi-thread", "signal", "signal-hook-registry", "socket2", "sync", "test-util", "time", "tokio-macros", "winapi"] }
tokio = { version = "1.17.0", features = ["bytes", "fs", "full", "io-std", "io-util", "libc", "macros", "memchr", "mio", "net", "num_cpus", "once_cell", "parking_lot", "process", "rt", "rt-multi-thread", "signal", "signal-hook-registry", "socket2", "sync", "test-util", "time", "tokio-macros"] }
tokio-util = { version = "0.6.9", features = ["codec", "compat", "futures-io", "io"] }
toml = { version = "0.5.8" }
tracing = { version = "0.1.32", features = ["attributes", "log", "std", "tracing-attributes"] }
Expand Down
6 changes: 3 additions & 3 deletions devtools/x-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ license = "Apache-2.0"
[dependencies]
camino = { version = "1.0.3", features = ["serde1"] }
debug-ignore = "1.0.1"
determinator = "0.7.0"
guppy = "0.12.3"
determinator = "0.8.0"
guppy = "0.13.0"
indoc = "1.0.3"
hakari = { version = "0.8.0", features = ["cli-support"] }
hakari = { version = "0.9.0", features = ["cli-support"] }
hex = "0.4.3"
log = "0.4.14"
toml = "0.5.8"
Expand Down
4 changes: 2 additions & 2 deletions devtools/x-lint/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ license = "Apache-2.0"

[dependencies]
camino = "1.0.3"
guppy = "0.12.3"
hakari = "0.8.0"
guppy = "0.13.0"
hakari = "0.9.0"
once_cell = "1.7.2"
toml = "0.5.8"
serde = { version = "1.0.124", features = ["derive"] }
Expand Down
9 changes: 4 additions & 5 deletions devtools/x/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ license = "Apache-2.0"
[dependencies]
camino = "1.0.3"
cargo_metadata = "0.14.0"
determinator = "0.7.0"
determinator = "0.8.0"
serde = { version = "1.0.124", features = ["derive"] }
serde_json = "1.0.64"
structopt = "0.3.21"
anyhow = "1.0.52"
colored-diff = "0.2.2"
guppy = { version = "0.12.3", features = ["summaries"] }
hakari = "0.8.0"
guppy = { version = "0.13.0", features = ["summaries"] }
hakari = "0.9.0"
indoc = "1.0.3"
toml = "0.5.8"
env_logger = "0.8.3"
Expand All @@ -26,8 +26,7 @@ chrono = "0.4.19"
globset = "0.4.6"
regex = "1.5.5"
rayon = "1.5.0"
nextest-config = { git = "https://github.com/diem/diem-devtools", rev = "f99a204e3d3f8e503d51d7df42e55c8282b59154" }
nextest-runner = { git = "https://github.com/diem/diem-devtools", rev = "f99a204e3d3f8e503d51d7df42e55c8282b59154" }
nextest-runner = "0.4.0"
indexmap = "1.6.2"
supports-color = "1.3.0"
x-core = { path = "../x-core" }
Expand Down
23 changes: 13 additions & 10 deletions devtools/x/src/nextest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ use crate::{
};
use anyhow::{bail, Context};
use camino::Utf8PathBuf;
use nextest_config::{NextestConfig, StatusLevel, TestOutputDisplay};
use nextest_runner::{
config::NextestConfig,
partition::PartitionerBuilder,
reporter::TestReporterBuilder,
reporter::{StatusLevel, TestOutputDisplay, TestReporterBuilder},
runner::TestRunnerBuilder,
signal::SignalHandler,
target_runner::TargetRunner,
test_filter::{RunIgnored, TestFilterBuilder},
test_list::{TestBinary, TestList},
SignalHandler,
test_list::{BinaryList, RustTestArtifact, TestList},
};
use std::{ffi::OsString, io::Cursor};
use structopt::StructOpt;
Expand Down Expand Up @@ -164,16 +165,18 @@ pub fn run(args: Args, xctx: XContext) -> Result<()> {
.unwrap_or(NextestConfig::DEFAULT_PROFILE),
)?;

let test_binaries = TestBinary::from_messages(package_graph, Cursor::new(stdout))?;
let test_binaries = BinaryList::from_messages(Cursor::new(stdout), package_graph)?;

let test_filter = TestFilterBuilder::new(args.run_ignored, args.partition, &args.filters);
let test_list = TestList::new(test_binaries, &test_filter)?;
let test_artifacts =
RustTestArtifact::from_binary_list(package_graph, test_binaries, None, None)?;
let test_list = TestList::new(test_artifacts, &test_filter, &TargetRunner::empty())?;

let handler = SignalHandler::new().context("failed to install nextest signal handler")?;
let runner = args
.runner_opts
.to_builder()
.build(&test_list, &profile, handler);
let runner =
args.runner_opts
.to_builder()
.build(&test_list, &profile, handler, TargetRunner::empty());

let mut reporter = args.reporter_opts.to_builder().build(&test_list, &profile);
if args.build_args.color.should_colorize(Stream::Stderr) {
Expand Down

0 comments on commit 7153156

Please sign in to comment.