vipm-io / vi-tester

VI Tester for LabVIEW
BSD 3-Clause "New" or "Revised" License
28 stars 26 forks source link

VI Tester includes project dependencies into search for test-classes #53

Open JonasEr opened 4 years ago

JonasEr commented 4 years ago

The VI "source/Utilities/Get All Project Class Paths.vi" makes an attempt to only look at libraries and classes that are "before dependencies", but fails to do so because of what looks like a typo in a regular expression.

The VI searches for <Item Name="Dependencies" Type="Dependencies"/> but the actual string in the LabVIEW project file is "<Item Name="Dependencies" Type="Dependencies">"

image

In my case the "Get All Project Class Paths.vi" finds some packed project libraries in dependencies which it cannot open and returns error 7

Error 7 occurred at Read from Text File in VITesterUtilities.lvlib:Get All Project Class Pathsjki_vi_tester.vi->VITesterUtilities.lvlib:Find Project Test Objectsjki_vi_tester.vi->Graphical Test Runner - Main UI - .vi

JonasEr commented 4 years ago

I may add that this is only a problem if the library that cannot open is the last to be processed by the "Get All Project Class Paths.vi" while-loop. This is because only the last error propagates out of the loop and the VI.

My current workaround is to add a dummy library to the project that will appear higher up in the LabVIEW project file and thus become the last one to be opened. Effectively stopping the earlier error from flowing out of the loop. I've named it something like "AAAAAA Dummy library.lvlib", just to make sure it ends up as high up as possible even if it would end up in the dependency section and not explicitly referenced in the project.

But really, just by having any "lvlib" in the project above the problematic one should work as a workaround