-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Anchor tests run successfully but shows error at end #2562
Comments
Yes, if you use |
Hmm..., does it make sense to remove this error if the un-built contract is not even being mentioned, don't wanna have to compile every contract in a workspace when testing concerns are separated in different parallel VMs to save time. Would be ready to work on this if it makes sense, wdyt @acheroncrypto? |
Most of the compiling time is taken by the initial compilation of the crates, and most of those crates will be shared between programs so any subsequent compilation will only take a fraction of the time it took after the first one. You can see the workflow of Anchor tests where each test folder is a separate Anchor workspace and CI tests are per workspace, not per program.
Reading all tests to decide whether a specific program is being used or not is not very practical. It would be much easier to solve this problem by either catching this error in your CI tests, or creating a filler IDL file for each program that's not built. |
Yeah makes sense, tried it out today and the speed difference does not really seem to matter, cloding this here |
Anchor tests run successfully but show an error at the end, Error: No such file or directory (os error 2).
Not 100% sure but might be related to this https://solana.stackexchange.com/questions/1648/error-no-such-file-or-directory-os-error-2-error-from-anchor-test, I am building the contracts in separate VMs using the -p command and running them in separate test suite using anchor test --run and --skip-build flag. This might be causing the idl to not be generated for the other programs in that VM and might be the cause of the error.
Again this is a guess, will need to see the code.
The text was updated successfully, but these errors were encountered: