Ceedling does not recognize "/" in paths in Windows
I am running Ceedling in windows, sometimes. I have the GNU toolchain installed via MSYS2/MINGW64 and Ceedling installed using Ruby. I can run all of my unit tests in Ceedling with no problems if I define all of the source file dependencies using TEST_FILE() or if the header file is included for any source file dependencies with no forward slashes. However, if an absolute or relative path is used (i.e. #include "../someFolder/myHeader.h"), then Ceedling will not compile the source file associated with the header. When running in Linux it works fine in this case.
I have exactly the same problem. On Windows files included with path are not compiled.
They are also missing in the build/test/preprocess/includes files.
i found a workaround for me:
replacing these lines:
https://github.com/ThrowTheSwitch/Ceedling/blob/75698bdf4ffd26d9a3a84c18ea81d8f2bc7174ad/lib/ceedling/preprocessinator_includes_handler.rb#L365-L370
with:
_nested.each_key do |filepath|
filepath1 = filepath.dup
filepath1.slice! "./"
if _shallow.has_key?( filepath1 )
common << filepath1 # Copy to common
_shallow.delete(filepath1) # Remove matching filepath from _shallow list
end
end
Because the path in the filepath variable have "./" as prefix and therefore don't match with _shallow where the path don't have "./" as prefix