Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redefine vsprintf in a nice way #44

Open
nicola-lunghi opened this issue Sep 16, 2020 · 1 comment
Open

redefine vsprintf in a nice way #44

nicola-lunghi opened this issue Sep 16, 2020 · 1 comment

Comments

@nicola-lunghi
Copy link

nicola-lunghi commented Sep 16, 2020

Hi,

first, thank you for this project is really nice!!!!

I have a couple of questions:

  1. there's a "nice way" without changing the ctest.h header to redefine the vsnprintf function?
    in my system I have to use a specific test_msg() function (for various reasons) to report text messages to the system so I cannot use any "printf" function. how can I extend ctest to use custom printf functions?

  2. Also I have another function test_results() to report results to the main test framework.
    there's a way to call a user function to report test results for the single test? how will you handle this?

  3. how can I define different test suites and skip/execute those depending on a "configuration":

for example I can have

suite1
suite2
suite3

configuration1 -> execute 1, skip 2 and 3
configuration2 -> execute 1, skip 2 execute 3
configuration3 -> execute 1, 2 and 3

switch(test_configuration)
case NO_STRESS_TEST
result = ctest_main(configuration1)
case TEST_ALL
result = ctest_main(configuration3)

@bvdberg
Copy link
Owner

bvdberg commented Sep 20, 2020

There is no real nice way. There is a CTEST_SKIP() version that skips tests, but you would have to wrap that in macros of your own..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants