Skip to content

Commit

Permalink
test: remove serial_test from forge tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes committed Feb 24, 2024
1 parent 81af7d3 commit 8413362
Show file tree
Hide file tree
Showing 8 changed files with 519 additions and 609 deletions.
9 changes: 4 additions & 5 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion crates/chisel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ tracing.workspace = true
[dev-dependencies]
criterion = { version = "0.5", features = ["async_tokio"] }
once_cell = "1"
serial_test = "2"
serial_test = "3"
tracing-subscriber.workspace = true

[features]
Expand Down
1 change: 0 additions & 1 deletion crates/forge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ globset = "0.4"
paste = "1.0"
path-slash = "0.2"
pretty_assertions.workspace = true
serial_test = "2"
svm = { package = "svm-rs", version = "0.3", default-features = false, features = ["rustls"] }
tempfile = "3"
tracing-subscriber = { workspace = true, features = ["env-filter", "fmt"] }
Expand Down
33 changes: 14 additions & 19 deletions crates/forge/tests/cli/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -614,36 +614,31 @@ contract Foo {
});

// test that `forge snapshot` commands work
forgetest!(
#[serial_test::serial]
can_check_snapshot,
|prj, cmd| {
prj.insert_ds_test();
forgetest!(can_check_snapshot, |prj, cmd| {
prj.insert_ds_test();

prj.add_source(
"ATest.t.sol",
r#"
prj.add_source(
"ATest.t.sol",
r#"
import "./test.sol";
contract ATest is DSTest {
function testExample() public {
assertTrue(true);
}
}
"#,
)
.unwrap();
)
.unwrap();

cmd.arg("snapshot");
cmd.arg("snapshot");

cmd.unchecked_output().stdout_matches_path(
PathBuf::from(env!("CARGO_MANIFEST_DIR"))
.join("tests/fixtures/can_check_snapshot.stdout"),
);
cmd.unchecked_output().stdout_matches_path(
PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("tests/fixtures/can_check_snapshot.stdout"),
);

cmd.arg("--check");
let _ = cmd.output();
}
);
cmd.arg("--check");
let _ = cmd.output();
});

// test that `forge build` does not print `(with warnings)` if file path is ignored
forgetest!(can_compile_without_warnings_ignored_file_paths, |prj, cmd| {
Expand Down
Loading

0 comments on commit 8413362

Please sign in to comment.