anchor
anchor copied to clipboard
cli: run tests in multiple processes
For projects with many independent test cases, running tests takes painfully long. Since test cases are independent, we can run all of them in parallel against one single instance of test validator. This PR implements:
- a new cmd line option,
mp_test
, to run tests in parallel. - a new option in
Anchor.toml
,mptest
, which specifies the details of multi-process test.
mptest.cmd
: the command used to run the tests
mptest.tests
: path to the folder that contains all test cases. Each test case is a single .ts
file.
We launch a single instance of test validator, and launch one process for each .ts
file.
@yf-castel is attempting to deploy a commit to the coral-xyz Team on Vercel.
A member of the Team first needs to authorize it.
Linking this to the relevant GH issue: https://github.com/coral-xyz/anchor/issues/637
At minimum this needs a new tests or to be applied to one of the existing tests with multiple test suites. Plus a changelog entry.