Sysprogs forums › Forums › VisualGDB › Support for Parametrized Tests on google test?
- This topic has 7 replies, 3 voices, and was last updated 4 years, 8 months ago by Jose Cazarin.
-
AuthorPosts
-
November 14, 2019 at 20:16 #26458Jose CazarinParticipant
Does VisualGDB support parametrized tests running on target with Google Test?
Cause I was reading a tutorial and when I changed the macro of a test case from TEST() to TEST_P() I started getting “No source available” errors on the Test Explorer
Thanks!
November 15, 2019 at 12:06 #26460JensaParticipantIt does and it works fine for us.
Did you remember to add the INSTANTIATE_TEST_CASE_P() macro to actually generate the code for them? The compiler errors you get are a bit horrible to figure out when it comes to the test code since it’s based on so much macro’s.
Another issue could be that I think the source code for the tests might be handled a bit differently when it’s from the package manager so it might be some issues with it realizing that the code needs some stuff that was previously optimized away depending on your compiler/link parameters.
November 16, 2019 at 01:37 #26465supportKeymasterThanks @Jensa for confirming that it works for you.
@jose-cazarin, if it still doesn’t work with your setup, could you please share your project type (MSBuild/Make), the build configuration (build on target, or using a cross-toolchain) and share the code that triggers the problem so that we could recheck it on our side?January 13, 2020 at 22:23 #27043Jose CazarinParticipantGetting back to this, what we are trying to do is: we have a .txt file with the inputs of an algorithm. We want to run this algorithm in our device and check if the results are the same. The problem is: this .txt file is too big, if we try to compile it within the embedded code we run out of memory. So we are trying to find a way to, during runtime, transfer the inputs from the PC to the embedded device and still use the GoogleTest framework
We will start looking into it again and try to make the parameterized tests work. But I don’t know if that’s the solution for what we need.
January 16, 2020 at 04:54 #27075supportKeymasterHi,
The parametrized tests unfortunately won’t solve the problem, however we are planning to extend our advanced semihosting framework to support reading test data same way it currently outputs test results. We should be able to give a time estimate on this in the next 1-2 weeks.
January 21, 2020 at 18:51 #27180Jose CazarinParticipantThanks, that would help a lot. I’ll keep in touch.
March 3, 2020 at 00:04 #27536supportKeymasterHi,
Just wanted to let you know that we have added support for test resources (files on the Windows machine that can be accessed from the embedded code) to the following VisualGDB build: VisualGDB-5.5.4.3548.msi
You can find a reference of the test resource manager API here: https://visualgdb.com/documentation/semihosting/_t_r_m_a_p_i.html
Please make sure you install the latest semihosting/profiler framework and enable test resources via VisualGDB Project Properties -> Unit Tests. The new functionality, along with detailed tutorials, will be included in the upcoming Preview 5.
March 4, 2020 at 16:52 #27559Jose CazarinParticipantThank you, that will be very helpful!
-
AuthorPosts
- You must be logged in to reply to this topic.