Skip to content

Commit

Permalink
Extract and genericize Graph for easier testing (#6010)
Browse files Browse the repository at this point in the history
### Problem

#4558 involves some relatively fidgety logic, but `Graph` was built in-situ and does not have any tests of its own.

### Solution

Extract and genericize `Graph` to allow for adding unit tests of the new behaviour in #4558. Add a very basic test; more useful ones will follow.
  • Loading branch information
Stu Hood authored Jun 26, 2018
1 parent aad4b7b commit 48224fc
Show file tree
Hide file tree
Showing 9 changed files with 604 additions and 308 deletions.
13 changes: 12 additions & 1 deletion src/rust/engine/Cargo.lock

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

4 changes: 3 additions & 1 deletion src/rust/engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ members = [
"fs",
"fs/brfs",
"fs/fs_util",
"graph",
"hashing",
"process_execution",
"process_execution/bazel_protos",
Expand All @@ -53,6 +54,7 @@ default-members = [
"boxfuture",
"fs",
"fs/fs_util",
"graph",
"hashing",
"process_execution",
"process_execution/bazel_protos",
Expand All @@ -69,10 +71,10 @@ enum_primitive = "0.1.1"
fnv = "1.0.5"
fs = { path = "fs" }
futures = "^0.1.16"
graph = { path = "graph" }
hashing = { path = "hashing" }
lazy_static = "0.2.2"
log = "0.4"
petgraph = "0.4.5"
process_execution = { path = "process_execution" }
resettable = { path = "resettable" }
tokio = "0.1"
Expand Down
11 changes: 11 additions & 0 deletions src/rust/engine/graph/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[package]
version = "0.0.1"
name = "graph"
authors = [ "Pants Build <pantsbuild@gmail.com>" ]

[dependencies]
boxfuture = { path = "../boxfuture" }
fnv = "1.0.5"
futures = "^0.1.16"
hashing = { path = "../hashing" }
petgraph = "0.4.5"
Loading

0 comments on commit 48224fc

Please sign in to comment.