Jose Cazarin

Forum Replies Created

Viewing 9 posts - 16 through 24 (of 24 total)
  • Author
    Posts
  • in reply to: Support for Parametrized Tests on google test? #27180
    Jose Cazarin
    Participant

    Thanks, that would help a lot. I’ll keep in touch.

    in reply to: Support for Parametrized Tests on google test? #27043
    Jose Cazarin
    Participant

    Getting 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.

    in reply to: Not compile some files based on current configuration #26767
    Jose Cazarin
    Participant

    Thank you, actually I thought about the ifdef solution a while after I posted it here, and it worked. Thank you!

    in reply to: TinyEmbeddedTest.h not found #26395
    Jose Cazarin
    Participant

    Yes, I can create a test project that works out of the box.

    I fixed the compilation errors by adding all the folders inside the C:\Users\user\AppData\Local\VisualGDB\EmbeddedEFPs\Profiler folder, had to tweak them a bit, add some includes, and then it compiled

    Then, I saw your last post, rolled back all these changes and just enabled the profiler/semihosting and checked the box that says “this project contains unit tests” and it compiled!

    Then, I created a simple test file with some dummy test cases, and it worked!

    Just a quick question, is there any way to select which main function is running? Because I need to 2 mains, the one where my application really is and the one to run the tests.

    I’m commenting out the real main to be able to run the tests, it’s a band-aid fix but I’m wondering  if there’s a better way to do that

    Thank you so much for your help so far!

    in reply to: TinyEmbeddedTest.h not found #26365
    Jose Cazarin
    Participant

    I’ve upgraded to the custom edition of the  VisualGDB

    What’s the best approach to adding unit tests to an existing project?

    What I tried: opening the VisualGDB properties of my current project and checking the box “this project contains unit tests based on” and selecting TinyEmbedded on the “Unit Tests” tab

    But when I do this, my project doesn’t compile anymore, it throws an error saying that it can’t find the SysprogsProfilerInterface.h header being included by the SysprogsTestHooks.cpp file

    But this file is present in the C:\Users\user\AppData\Local\VisualGDB\EmbeddedEFPs\Profiler folder

    I’ve tried to add the path to it manually  in the Include Directories but after this the error is

    Error undefined reference to `SysprogsProfiler_WriteData’

    Looks like something is still missing in the configuration

    in reply to: TinyEmbeddedTest.h not found #26341
    Jose Cazarin
    Participant

    Right, now I realized that I got the Embedded version, thats why I was having problems. Thanks for you help

    in reply to: TinyEmbeddedTest.h not found #26338
    Jose Cazarin
    Participant

    I don’t have the submenu “Unit Tests” on my “VisualGDB Project Properties” windows. See SS attached. Should it be there?

    When I put the nrf5x.props file that you attached in my project it builds fine!

    But the Test Explorer is not finding any tests, it just outputs “No tests found to run.”

    At least the example tests in the $(ProjectName)Tests should have run right?

     

     

     

    Attachments:
    You must be logged in to view attached files.
    in reply to: TinyEmbeddedTest.h not found #26333
    Jose Cazarin
    Participant

    Ok, I attached the project for you to take a look

    Kind regards!

    • This reply was modified 5 years, 1 month ago by Jose Cazarin.
    Attachments:
    You must be logged in to view attached files.
    in reply to: TinyEmbeddedTest.h not found #26331
    Jose Cazarin
    Participant

    The problem was really affecting the build.

    Thanks for the answer. So, actually I’m using an NRF microcontroller. But I was able to find the headers, and I just included the path to them in the “Include Directories” field in the “VisualGDB Project Properties” and now they are found! But I think it should work out of the box.

    But looks like the project wasn’t finding the .c files. So, I added the whole
    <h5>”%LOCALAPPDATA%\VisualGDB\TestFrameworks\com.sysprogs.unittest.tinyembtest“</h5>
    folder to my project. And now the problem is:
    <h5>\Local\VisualGDB\TestFrameworks\com.sysprogs.unittest.tinyembtest\SysprogsTestHooks.cpp(87,5): error : ‘pthread_mutex_t’ does not name a type; did you mean ‘pthread_atfork’?
    1> pthread_mutex_t m_Mutex;</h5>
    Looks like it’s not finding the pthread-related files. I even added the <pthread.h> header to the SysprogsTestHooks.cpp file (and the it is being found), but still got the same problem.

    Can you help me with this? Maybe it is something related to Windows since pthread.h is Unix-related

     

    Thanks!

     

     

Viewing 9 posts - 16 through 24 (of 24 total)