Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7458849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T13:30:40+00:00 2026-05-29T13:30:40+00:00

I have project in which I want to use check library for unit testing.

  • 0

I have project in which I want to use check library for unit testing.

My current project is using CMake and has following structure:

.
├── CMakeLists.txt
├── COPYING
├── ChangeLog
├── README
├── src
│   ├── core
│   │   ├── CMakeLists.txt
│   │   └── main.c
│   ├── core-test
│   │   ├── CMakeLists.txt
│   │   └── main.c
│   └── scrypt
└── doc
    └── protocol.txt

In core-test I have unit tests for core module. In scrypt-test I will have tests for scrypt module and so on.


Does using check with CTest make sense?

If yes: how do I connect unit test that use check to CMake/CTest project? Do I need additional configuration for CTest to interpret results from check-enabled executables?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T13:30:41+00:00Added an answer on May 29, 2026 at 1:30 pm

    Using check with CTest is possible, unfortunately not convenient.

    When unit tests using check fail they will be counted as a failure in CTest. The problem is, that CTest doesn’t show output of application that failed1. The other downside is that CTest doesn’t count individual check tests, so a “single” failed test could mean multiple check tests. I wasn’t able to find a way to make CTest interpret check results.


    1. You can force printing of output by creating CTestCustom.cmake file in build directory (the same one in which you run make or ctest) with following contents:

      set (CTEST_CUSTOM_POST_TEST “cat Testing/Temporary/LastTest.log”)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a unit which I want to use in two different programs, to
I have a static class in a shared project, which I want to extend
I have a project which is source controlled using Subversion and VisualSVN. Since the
I have a project which it's domain contain following classes: Courier Customer Food Order
I have a project which exposes object model to use by different types of
I have a project which has a set of binary dependencies (assembly dlls for
I want to use the ASSIMP library http://assimp.sourceforge.net in an iOS project. Unfortunately, I'm
I am doing a project in java swing in which I have to use
I have a whole bunch of projects which I want to reuse between the
I have a project which contains different components that everyone works on. We have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.