Unsolved Qt Creator Setting Bulk Test Environment
-
Hi Guys,
I have a bunch of Qt tests in my project and they all need something appended toPATH
in order to run. I don't want to go in each and every one of them to set the run environment. Is there a way to set it up in bulk?
Thanks -
Hi @VRonin,
which build system and Qt version are you using?
You can set up the environment per Kit, (Tools > Options), so maybe set up a special kit for that?
Regards
-
@aha_1980 CMake Qt 5.15 and 6.1
The one you set at the kit level is the build environment, not the run environment, isn’t it? -
@VRonin No, there is another one in Tools > Options > Kits.
So in principle you could create a clone of your 5.15 kit which has the PATH set up for the unit tests. Then you use that kit when you want to build & run the tests.
Could that work?
Regards
-
@VRonin said in Qt Creator Setting Bulk Test Environment:
I have a bunch of Qt tests in my project and they all need something appended to PATH in order to run. I don't want to go in each and every one of them to set the run environment. Is there a way to set it up in bulk?
If you run them in creator, then just append the path before starting it ... or whatever it is you use to run them ...
$> PATH=$PATH:/something/odd qtcreator
-
@kshegunov this is the method I’m currently using but I thought there must be a better one, I’ll try the kit option
-
Btw, any specific reason you want to modify the PATH of all things? Typically there're better workarounds ...
-
@kshegunov I just want my test to find a bunch of dlls they depend on (I’m on windows)
If you have better ways I’d love to hear them -
What about symlinking the binaries? Or do you intend to link against mentioned libraries?