You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Of course you could change the working directory to the build folder, but if I remember correctly I did it like that because some tests also produce output and I did not want that in the build dir. Maybe you could figure out a way for CMake to notice if the folder content changed?
I think to fix it you'd have to copy each file separately with a custom command (so it happens at build time), and you'd have to list the test files in the CMakeLists, because if you rely on globbing it will not pick up new files.
The way I've handled this in another project is to bake the test directory path into the test executables, using configure_file. Seems a bit odd, but you're not allowed to move build directories around and the tests aren't installed so it works nicely in practice. This also makes it easier to execute tests manually, because you don't have to cd to the right dir.
Test data files are copied to the build dir here:
libadm/tests/CMakeLists.txt
Line 23 in 146670a
But this only happens when cmake runs, so if the test data is edited it will be stale when the tests are ran.
Suggest just running the tests in the source dir.
The text was updated successfully, but these errors were encountered: