Change `forge test` command
Closed this issue · 7 comments
rotcivegaf commented
This command run the test file and the script/Exploit-template_new.sol:ExploitScript
:
forge test --contracts <FILE_PATH> -vvv
I think this command would be more accurate:
forge test --match-contract <CONTRACT_NAME> -vvv
I can work in the changes if I get your confirmation
SunWeb3Sec commented
Yep, we can improve it. thanks @rotcivegaf
rotcivegaf commented
I think it's done, my pleasure
SunWeb3Sec commented
merged #829
Thanks a lot!
BowennCAI commented
this change made some not compilable, for example:
when running
forge test --match-contract P719Token_exp -vvv
it reprots:
Error (6275): Source "src/test/compilation/KyberSwap/interfaces/periphery/IBasePositionManager.sol" not found: File not found. Searched the following locations: "/home/lanfear/Github/DeFiHackLabs".
ParserError: Source "src/test/compilation/KyberSwap/interfaces/periphery/IBasePositionManager.sol" not found: File not found. Searched the following locations: "/home/lanfear/Github/DeFiHackLabs".
--> src/test/compilation/KyberSwap_exp.eth.1.sol:7:1:
|
7 | import {IBasePositionManager as IKyberswapPositionManager} from "./KyberSwap/interfaces/periphery/IBasePositionManager.sol";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error (6275): Source "src/test/compilation/KyberSwap/interfaces/IPool.sol" not found: File not found. Searched the following locations: "/home/lanfear/Github/DeFiHackLabs".
ParserError: Source "src/test/compilation/KyberSwap/interfaces/IPool.sol" not found: File not found. Searched the following locations: "/home/lanfear/Github/DeFiHackLabs".
--> src/test/compilation/KyberSwap_exp.eth.1.sol:8:1:
|
8 | import {IPool as IKyberswapPool} from "./KyberSwap/interfaces/IPool.sol";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rotcivegaf commented
Mmm, I don't think the error was caused by my changes
AFK right now, let me a few hours to check
rotcivegaf commented
BowennCAI commented
okay, I guess it's might be me added sth unintentionally in my project.