Closed marcus-sonestedt closed 6 months ago
Hi! Extremely sorry for late review. I'm not sure what problem this PR solves.
TcUnit-Runner works fine with subdirectories. For example, this project works just fine.
Project("{B1E792BE-AA5F-4E3C-8C82-674BF9C0715B}") = "TcUnit-Verifier_TwinCAT", "TcUnit-Verifier_TwinCAT\TcUnit-Verifier_TwinCAT.tsproj", "{3B151CEE-1DB6-4543-9B44-7AFACBDFB147}"
How is this different than this example in regards with subdirectories?
Project("{B1E792BE-AA5F-4E3C-8C82-674BF9C0715B}") = "CatFish Usermode", "CatFish Usermode\CatFish Usermode.tsproj", "{C05C6525-F818-434B-B8BD-AB198DB4ED7A}"
EndProject
Poor example on my part.
We don't have the standard TwinCAT solution/project structure so tcunit-runner was looking for the project/solution in the wrong folder for us. This fix should keep the existing behavior but also work for other cases.
The problem (as I recall it, we've been running with a patched version for a while) is with further nested subdirs for the tsproj files, as the previos code wiped all subdirs and assumed they had the same name as the project.
I should probably write a unit test or three to show that old behavior is preserved, and new adds stuff. (If easy to test, I haven't dug into that part of this project.. yet. :)
@marcusl Do you have an example project where it was not working with the old code? You can remove all the TwinCAT-code and just leave the solution with the twincat project. (but remove all POUs and everthing). Just so I understand how the folder structure looks like.
This project is archived. Replacement for it is in the works.
TcUnit runner did not find my .tsproj when I had this line in the .sln. This PR fixes that and keeps the old behavior (if necessary, didn't want to touch that)