Setting an environment variable before running cargo test

Hi all,

My Windows unit tests are using a custom DLL to be able to run. I can set the *Path * environment variable directly on the command prompt and it works perfectly.

But is there a way to set this automatically before running cargo test ? It tried a build script and no success. It'll be useful for any CI automation.

Thanks for your help !

No, there's no built-in mechanism for it. You need to use your CI's configuration or external scripts to set up the environment.

That's what I was suspecting. Thanks anyway for your answer.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.