Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pranker.sol not found #462

Closed
qianqianpang opened this issue Apr 8, 2024 · 4 comments
Closed

Pranker.sol not found #462

qianqianpang opened this issue Apr 8, 2024 · 4 comments
Assignees

Comments

@qianqianpang
Copy link

Hello, I'm experiencing an issue with ityfuzz.

When testing the CounterTest contract located at tests/evm_manual/foundry1/test/Counter.t.sol, I encountered the error "ParserError: Source './Pranker.sol' not found: File not found." It seems that the file Pranker.sol is missing from the project.

Could you please provide it to me? Thank you very much for your assistance!

@iamjacobjia
Copy link
Contributor

Please try the following steps:

  1. Make sure foundry is installed: https://book.getfoundry.sh/getting-started/installation
  2. cd tests/evm_manual/foundry1
  3. cargo run evm -m CounterTest -- forge build. The -- forge build indicates the use of forge build to compile solidity files before running ityfuzz.

@qianqianpang
Copy link
Author

@jacob-chia
Could you please clarify the difference between these two commands? I often see them in issues, but I'm a bit confused:
1)cargo run evm -m CounterTest and -- forge test
2)ityfuzz evm -m Counter.t.sol:CounterTest -- forge test

@iamjacobjia
Copy link
Contributor

  1. cargo run = cargo build & ./target/debug/ityfuzz.
  2. "CounterTest" is the name of the test contract. -m CounterTest will match CounterTest in all files in the current directory, while -m Counter.t.sol:CounterTest will only match in the Counter.t.sol file.
  3. -- forge test is the build command。Both forge build and forge test will build, but forge test not only builds but also tests afterwards, which is redundant. Moreover, some test cases can only be executed through ityfuzz, and forge test would fail. Therefore, -- forge build is the correct build command.

@qianqianpang
Copy link
Author

thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants