How to execute additional code before runtests.jl?

nsajko
Sun, 05 May 2024 05:47:42 +0000
General Usage

I’m trying to solve How to detect whether the build (compiler options) is a production build. I think the right solution is to introduce a global boolean constant whose value would be determined by the user (most often CI) so that it would be available within test/runtests.jl. This could be solved with Preferences.jl, however that seems unnecessarily complicated as it involves TOML files on disk.

Is there a way to define a statement like const flag = true that would execute before test/runtests.jl. It should be easy to use from CI.

3 posts - 3 participants