From 87d0adc18b8c81171a4c6285956e4590bec35288 Mon Sep 17 00:00:00 2001 From: Mitch Russell <34431383+mjoerussell@users.noreply.github.com> Date: Tue, 4 Feb 2025 15:34:52 -0600 Subject: [PATCH] Modify the `infra test cargo` command to run more tests. (#1218) I discovered this while looking into #1181. I tried adding a test case to the query parsing tests, but found that none of them were getting run. This PR fixes only that issue, nothing else about #1181. Previously, the command used to run tests was `cargo nextest run --workspace --all-features --lib --bins --examples --no-fail-fast`. This command ended up skipping the tests in the `metaslang` packages. We can run these as well by changing the command to `cargo nextest run --workspace --exclude solidity_testing_perf --all-features --all-targets --no-fail-fast`. `--exclude solidity_testing_perf` is required because it tries to link with callgrind, which will not be available on all platforms. It's possible that this crash was the reason for the original restrictions in the first place, but I don't know for sure. We can think about different ways to conditionally run those tests in the future, if it's wanted. --- crates/infra/cli/src/commands/test/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/infra/cli/src/commands/test/mod.rs b/crates/infra/cli/src/commands/test/mod.rs index 792a037d1e..e2c459827c 100644 --- a/crates/infra/cli/src/commands/test/mod.rs +++ b/crates/infra/cli/src/commands/test/mod.rs @@ -46,6 +46,7 @@ fn test_cargo() -> Result<()> { .args(["nextest", "run"]) .flag("--workspace") .flag("--all-features") + .flag("--tests") .flag("--lib") .flag("--bins") .flag("--examples")