Unit Tests for Make-based Project

Sysprogs forums Forums VisualGDB Unit Tests for Make-based Project

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #36754
    Umair
    Participant

    Hi,

    I’m working on a make-based project for nrf52xxx MCU. My team is using VisualGDB + Visual Studio for development as well as debugging. Now, we want to write Unit Tests for the application using TinyEmbeddedTest Framework,,, but we didn’t find any support related to Unit Tests configuration via makefile.

    For “Advance CMake” projects, It’s really easy to configure Unit Tests, just like;

    find_test_framework(ID com.sysprogs.unittest.tinyembtest)

    How can I configure Unit Tests for Make-based project?

    Thank You!

     

     

    #36755
    support
    Keymaster

    Hi,

    The GNU Make-based projects are much more limited compared to CMake. You can still create test projects with GNU Make via the VisualGDB Project Wizard, however the test project will have to be separate from the main project, and the Makefile structure will have a lot more duplication compared to CMake.

    #36757
    Umair
    Participant

    Hi, thanks for your response.
    “test project will have to be separate from the main project”, Having the test project separate from the main project doesn’t seem like a reliable or maintainable solution.
    I believe it would be much easier if we migrate our project from Make to CMake? This would simplify the integration of TinyEmbeddedTest and allow us to keep both the source and test code within the same project structure. What’s your take on this?
    Thank You!

    • This reply was modified 2 weeks, 4 days ago by Umair. Reason: typos
    #36759
    support
    Keymaster

    Hi,

    You can alternatively try going to VisualGDB Project Properties -> Unit Tests and enabling a checkbox there, but might trigger all kinds of unexpected errors with Make. The GNU Make is very limited compared to CMake, and the Advanced CMake Project Subsystem was designed exactly to bypass the shortcomings of the GNU Make and MSBuild.

    We would advise looking through the documentation to get familiar with main concepts. It will take some time to port a non-trivial project, but it will pay off as the project gets more complicated.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.