I think nextest's wrapper scripts can be used for this? https://nexte.st/docs/configuration/wrapper-scripts/