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

Catch2 macros not logged #372

Closed
5 tasks done
Michal-Hubert opened this issue Jan 18, 2023 · 6 comments
Closed
5 tasks done

Catch2 macros not logged #372

Michal-Hubert opened this issue Jan 18, 2023 · 6 comments

Comments

@Michal-Hubert
Copy link

Checklist

  • The issue is about this extension and NOT about a fork.
  • Check the known issues list.
  • The latest version of the extension was used.
  • It is not related to remote-vscode or I checked the following issue
  • Imagine yourself into my position and think how hard to debug the issue without insufficient information.
    I understand that you have privacy concerns and I expect you to understand that this extension is developed for free.
    Thanks.

The settings.json has an entry:

"testMate.cpp.log.logpanel": true

The relevant unit test part looks like:

if (<some condition>) {
  INFO("Condition failed !")
  FAIL();
}

If condition fails then whole unit test is correctly marked as failed but there is no any indicator where. Nothing is highlighted and nothing is printed in the output. If test has a few others such snippets it's very difficult to find out which one actually failed.

@matepek
Copy link
Owner

matepek commented Jan 19, 2023

How about FAIL( "This test case causes segfault, which breaks CI." );

deatials

@matepek matepek closed this as completed Jan 19, 2023
@matepek
Copy link
Owner

matepek commented Jan 19, 2023

interestingly my output for

TEST_CASE("log macros test") {
  INFO("Logging some INFO");
  FAIL();
}

test is:

$3│ [ RUN      ] `log macros test` @ /Users/matepek/priv/vscode-catch2-test-adapter/test/cpp/catch2/catch2v3_test1.cpp:94
$3│ │ Info:
$3│ │ │ Logging some INFO
$3│ [  FAILED  ] `log macros test` in 0.000533 second(s)

@Michal-Hubert
Copy link
Author

Michal-Hubert commented Jan 30, 2023

@matepek thanks for response. I have tested it on a small project and works fine but on a larger one (~700 unit tests) the console output is pretty messy so that's the reason macro outputs are barely visible. It looks like this:
image
Is there any way I can debug it further ?
Btw, shall test run output be also visible in testMate.cpp.log.logfile ? I don't see there anything related to test run.

@matepek
Copy link
Owner

matepek commented Jan 30, 2023

Try setting test.parallelExecutionLimit to 1.
That would help to understand more about the issue.

@Michal-Hubert
Copy link
Author

I see tests being executed sequentially but still the output is messed up.

@Michal-Hubert
Copy link
Author

@matepek problem solved ! As it's large project I bumped system's fs.inotify.max_user_watches and now output looks clean. It looks like it was not testmate specific issue as some other outputs were also messed up.

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