Skip to content

Commit

Permalink
tests: don't have cargo install test tools
Browse files Browse the repository at this point in the history
I noticed that `cargo install --path .` will install the new
`fake-editor` and `fake-diff-editor` binaries. We don't want that, so
let's move them into a separate crate. The tests still find them
without needing any modification.
  • Loading branch information
martinvonz committed Apr 20, 2022
1 parent 5e729ec commit 1ed05fa
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 9 deletions.
9 changes: 9 additions & 0 deletions Cargo.lock

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

11 changes: 2 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,12 @@ categories = ["command-line-utilities", "development-tools"]
name = "jj"
path = "src/main.rs"

[[bin]]
name = "fake-editor"
path = "testing/fake-editor.rs"

[[bin]]
name = "fake-diff-editor"
path = "testing/fake-diff-editor.rs"

[[bench]]
name = "diff_bench"
harness = false

[workspace]
members = ["lib"]
members = ["lib", "testing"]

[dependencies]
assert_cmd = "2.0.4"
Expand Down Expand Up @@ -63,6 +55,7 @@ test-case = "2.0.2"
regex = "1.5.5"
criterion = "0.3.5"
criterion_bencher_compat = "0.3.4"
jujutsu-testing = { version = "=0.4.0", path = "testing"}
predicates = "2.1.1"

[features]
Expand Down
24 changes: 24 additions & 0 deletions testing/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[package]
name = "jujutsu-testing"
version = "0.4.0"
authors = ["Martin von Zweigbergk <martinvonz@google.com>"]
edition = "2021"
rust-version = "1.57"
license = "Apache-2.0"
description = "Testing library for Jujutsu (an experimental VCS)"
homepage = "https://github.com/martinvonz/jj"
repository = "https://github.com/martinvonz/jj"
documentation = "https://docs.rs/jujutsu"
readme = "../README.md"

[[bin]]
name = "fake-editor"
path = "src/fake-editor.rs"

[[bin]]
name = "fake-diff-editor"
path = "src/fake-diff-editor.rs"

[dependencies]
clap = { version = "3.1.10", features = ["derive"] }
itertools = "0.10.3"
File renamed without changes.
File renamed without changes.

0 comments on commit 1ed05fa

Please sign in to comment.