Skip to content

Commit 8ef1302

Browse files
authored
chore: fix test isolate (#9468)
1 parent ade4b35 commit 8ef1302

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

crates/forge/tests/cli/ext_integration.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ fn lil_web3() {
100100

101101
#[test]
102102
#[cfg_attr(windows, ignore = "Windows cannot find installed programs")]
103+
#[cfg(not(feature = "isolate-by-default"))]
103104
fn snekmate() {
104105
ExtTester::new("pcaversaccio", "snekmate", "df226f4a45e86c8f8c3ff1f9fa3443d260002050")
105106
.install_command(&["pnpm", "install", "--prefer-offline"])

crates/forge/tests/cli/script.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1923,6 +1923,10 @@ contract SimpleScript is Script {
19231923

19241924
// Asserts that the script runs with expected non-output using `--quiet` flag
19251925
forgetest_async!(adheres_to_json_flag, |prj, cmd| {
1926+
if cfg!(feature = "isolate-by-default") {
1927+
return;
1928+
}
1929+
19261930
foundry_test_utils::util::initialize(prj.root());
19271931
prj.add_script(
19281932
"Foo",
@@ -2367,12 +2371,12 @@ contract SimpleScript is Script {
23672371
[SOLC_VERSION] [ELAPSED]
23682372
Compiler run successful!
23692373
Traces:
2370-
[103771] SimpleScript::run()
2374+
[..] SimpleScript::run()
23712375
├─ [0] VM::startBroadcast()
23722376
│ └─ ← [Return]
2373-
├─ [23273] → new A@0x5b73C5498c1E3b4dbA84de0F1833c4a029d90519
2377+
├─ [..] → new A@0x5b73C5498c1E3b4dbA84de0F1833c4a029d90519
23742378
│ └─ ← [Return] 116 bytes of code
2375-
├─ [13162] → new B@0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496
2379+
├─ [..] → new B@0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496
23762380
│ ├─ [145] A::getValue() [staticcall]
23772381
│ │ └─ ← [Return] 100
23782382
│ └─ ← [Return] 62 bytes of code

crates/forge/tests/cli/test_cmd.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2357,10 +2357,10 @@ Compiler run successful!
23572357
Ran 1 test for test/MetadataTraceTest.t.sol:MetadataTraceTest
23582358
[PASS] test_proxy_trace() ([GAS])
23592359
Traces:
2360-
[149783] MetadataTraceTest::test_proxy_trace()
2361-
├─ [47297] → new Counter@0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
2360+
[..] MetadataTraceTest::test_proxy_trace()
2361+
├─ [..] → new Counter@0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
23622362
│ └─ ← [Return] 236 bytes of code
2363-
├─ [37762] → new Proxy@0x2e234DAe75C793f67A35089C9d99245E1C58470b
2363+
├─ [..] → new Proxy@0x2e234DAe75C793f67A35089C9d99245E1C58470b
23642364
│ └─ ← [Return] 62 bytes of code
23652365
└─ ← [Stop]
23662366
@@ -2382,10 +2382,10 @@ Compiler run successful!
23822382
Ran 1 test for test/MetadataTraceTest.t.sol:MetadataTraceTest
23832383
[PASS] test_proxy_trace() ([GAS])
23842384
Traces:
2385-
[128142] MetadataTraceTest::test_proxy_trace()
2386-
├─ [36485] → new Counter@0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
2385+
[..] MetadataTraceTest::test_proxy_trace()
2386+
├─ [..] → new Counter@0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
23872387
│ └─ ← [Return] 182 bytes of code
2388-
├─ [26959] → new Proxy@0x2e234DAe75C793f67A35089C9d99245E1C58470b
2388+
├─ [..] → new Proxy@0x2e234DAe75C793f67A35089C9d99245E1C58470b
23892389
│ └─ ← [Return] 8 bytes of code
23902390
└─ ← [Stop]
23912391
@@ -2667,6 +2667,7 @@ Suite result: FAILED. 0 passed; 1 failed; 0 skipped; [ELAPSED]
26672667
});
26682668

26692669
// Tests that test traces display state changes when running with verbosity.
2670+
#[cfg(not(feature = "isolate-by-default"))]
26702671
forgetest_init!(should_show_state_changes, |prj, cmd| {
26712672
cmd.args(["test", "--mt", "test_Increment", "-vvvvv"]).assert_success().stdout_eq(str![[r#"
26722673
...

0 commit comments

Comments
 (0)