Skip to content

Commit

Permalink
fix: use feature instead of cfg so that cargo test --list can find tests
Browse files Browse the repository at this point in the history
  • Loading branch information
willemneal committed Oct 3, 2023
1 parent 9c6a647 commit e19d7f1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions cmd/crates/soroban-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@ fs_extra = "1.3.0"
serde_json = "1.0.93"
which = { workspace = true }
tokio = "1.28.1"

[features]
integration = []
2 changes: 1 addition & 1 deletion cmd/crates/soroban-test/tests/it/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mod arg_parsing;
mod config;
#[cfg(ignore)]
#[cfg(feature = "integration")]
mod integration;
mod lab;
mod plugin;
Expand Down
2 changes: 1 addition & 1 deletion cmd/soroban-rpc/internal/test/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func cargoTest(t *testing.T, name string) {
}

func TestCLICargoTest(t *testing.T) {
names := icmd.RunCmd(icmd.Command("cargo", "-q", "test", "integration::", "--package", "soroban-test", "--", "--list"))
names := icmd.RunCmd(icmd.Command("cargo", "-q", "test", "integration::", "--package", "soroban-test", "--features", "integration", "--", "--list"))
input := names.Stdout()
lines := strings.Split(input, "\n")
for _, line := range lines {
Expand Down

0 comments on commit e19d7f1

Please sign in to comment.