Skip to content

Invalid exit code when running forge test if compilation is failing #10857

Closed as not planned
@hussein-aitlahcen

Description

@hussein-aitlahcen

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge Version: 1.2.3-nightly Commit SHA: c3e58d4 Build Timestamp: 2025-06-26T06:01:17.679993776Z (1750917677) Build Profile: maxperf

What version of Foundryup are you on?

No response

What command(s) is the bug in?

forge test

Operating System

Linux

Describe the bug

Running forge test; echo $? yields 0 exit code when compilation is failing.

Error (9755): Wrong argument count for struct constructor: 6 arguments given but expected 5.
    --> evm/tests/src/05-app/Zkgm.t.sol:6053:33:
     |
6053 |                                 Unstake({
     |                                 ^ (Relevant source part starts here and spans across multiple lines).

Error: Compilation failed
0

Metadata

Metadata

Assignees

Labels

T-bugType: bugT-needs-triageType: this issue needs to be labelled

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions