On CI and locally, we run all in-language test project for a particular experimental language feature, although a small subset of them is actually relevant for a particular language feature.
#7614 introduces the run_in_language_tests.sh script, which can be adapted to filter only the test project which are relevant for a certain dynamic feature. For example, for --experimental dynamic_storage we want to test only the projects matching the regex "storage".
Note that filtering test projects is not the same as filtering tests using forc test <test>. forc test, when run on workspace, will still build all test projects, which is what we want to avoid.
Once we fix #7613 we can still use the run_in_language_test.sh with the filter. The script can simply generate a workspace Forc.toml on the fly and run forc test on it.
In addition to filtering test projects, we can get additional speed gain by grouping tests which are testing the same std module into a single test project.
This grouping will also improve the structure of test projects. For easier discoverability and maintenance, test projects should ideally follow the same structure as the structure of modules in the standard library.
Also, the current naming convention with _inline_tests or _contract_tests prefixes is very verbose and brings visual clutter, while not having a concrete benefit.
Tasks
On CI and locally, we run all in-language test project for a particular experimental language feature, although a small subset of them is actually relevant for a particular language feature.
#7614 introduces the
run_in_language_tests.shscript, which can be adapted to filter only the test project which are relevant for a certain dynamic feature. For example, for--experimental dynamic_storagewe want to test only the projects matching the regex "storage".Note that filtering test projects is not the same as filtering tests using
forc test <test>.forc test, when run on workspace, will still build all test projects, which is what we want to avoid.Once we fix #7613 we can still use the
run_in_language_test.shwith the filter. The script can simply generate a workspaceForc.tomlon the fly and runforc teston it.In addition to filtering test projects, we can get additional speed gain by grouping tests which are testing the same
stdmodule into a single test project.This grouping will also improve the structure of test projects. For easier discoverability and maintenance, test projects should ideally follow the same structure as the structure of modules in the standard library.
Also, the current naming convention with
_inline_testsor_contract_testsprefixes is very verbose and brings visual clutter, while not having a concrete benefit.Tasks