Skip to content

Commit

Permalink
Speed up engine integration tests (#1897)
Browse files Browse the repository at this point in the history
## 馃専 What is the purpose of this PR?

The engine tests has to be run from time to time and this usually slows down our current CI by a lot. This PR reduces the amount of tests running on the engine.

## 馃敆 Related links

<!-- Add links to any context it is worth capturing (e.g. Issues, Discussions, Discord, Asana) -->
<!-- Mark any links which are not publicly accessible as _(internal)_ -->
<!-- Don't rely on links to explain the PR, especially internal ones: use the sections above -->

- [Asana task](https://app.asana.com/0/1203543021352041/1203767287750359/f) _(internal)_

## 馃攳 What does this change?

- Set the step count to `10` for integration tests
- Don't run the engine in `production`
- Use `cargo-nextest` instead of `cargo test`
  • Loading branch information
TimDiekmann committed Jan 25, 2023
1 parent f675a41 commit 6e73a1e
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions apps/engine/Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ dependencies = ["build-test-deps"]
[tasks.run-integrations]
private = true
extend = "cargo"
args = ["test", "--workspace", "--test", "integration", "--no-fail-fast", "--profile", "${CARGO_MAKE_CARGO_PROFILE}", "--all-features"]
dependencies = ["setup-python"]
args = ["nextest", "run", "--workspace", "--test", "integration", "--no-fail-fast", "--cargo-profile", "${CARGO_MAKE_CARGO_PROFILE}", "--all-features"]
dependencies = ["install-cargo-nextest", "setup-python"]

# The workspace crate (`hash_engine_lib`) does not have any source files but only the integration tests. `rustdoc` will
# error when running on an empty crate, so disable running it on the workspace crate.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"radar_zone_arange": {
"steps": 100,
"steps": 10,
"type": "arange",
"field": "radarZone",
"start": 5,
"stop": 20,
"increment": 5
},
"missile_speed_arange": {
"steps": 600,
"steps": 10,
"type": "arange",
"field": "missileSpeed",
"start": 1,
"stop": 3,
"increment": 0.5
},
"radar_max_missiles_arange": {
"steps": 200,
"steps": 10,
"type": "arange",
"field": "radarMaxMissiles",
"start": 1,
Expand Down Expand Up @@ -53,6 +53,6 @@
[30, 32]
]
],
"steps": 100
"steps": 10
}
}
6 changes: 3 additions & 3 deletions apps/engine/tests/examples/boids_3d/experiments.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
"start": 10,
"stop": 16,
"increment": 2,
"steps": 100,
"steps": 10,
"type": "arange"
},
"agent_count_value": {
"steps": 100,
"steps": 10,
"type": "values",
"field": "agent_count",
"values": [25, 100, 200]
},
"sweep_flocks": {
"steps": 100,
"steps": 10,
"type": "group",
"runs": ["cohesion_arange", "agent_count_value"]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"type": "values",
"field": "",
"values": [1],
"steps": 100
"steps": 10
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"good_psa_freq_log_normal": {
"steps": 100,
"steps": 10,
"type": "monte-carlo",
"field": "good_psa_freq",
"samples": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "values",
"field": "layout",
"values": ["columns", "rows"],
"steps": 500
"steps": 10
},
"find_optimal_layout": {
"type": "optimization",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{
"steps": 50,
"steps": 10,
"expected-output": {}
}
]

0 comments on commit 6e73a1e

Please sign in to comment.