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

Add CppUTest support #750

Merged
merged 3 commits into from
Sep 18, 2020
Merged

Add CppUTest support #750

merged 3 commits into from
Sep 18, 2020

Conversation

OMantere
Copy link
Contributor

@OMantere OMantere commented Sep 15, 2020

This PR adds support for the CppUTest test framework (http://cpputest.github.io)

@OMantere OMantere changed the title Added CppUTest support Add CppUTest support Sep 15, 2020
@AlexDenisov
Copy link
Member

Hi @OMantere, thanks for the PR. There are some weird failures I'm trying to debug right now. What I see is that CppUTest re-defines operators new/delete which interferes with LLVM memory management. I'll try to find the fix for this issue, but if you have any ideas/suggestions - do not hesitate to share them :)

@AlexDenisov
Copy link
Member

All right, the memory leak thing can be disabled with the following change:

diff --git a/vendor/CMakeLists.txt b/vendor/CMakeLists.txt
index 0f1d1b7..971d486 100644
--- a/vendor/CMakeLists.txt
+++ b/vendor/CMakeLists.txt
@@ -1,3 +1,7 @@
 add_subdirectory(json11 EXCLUDE_FROM_ALL)
 add_subdirectory(LibEBC EXCLUDE_FROM_ALL)
+
 add_subdirectory(cpputest EXCLUDE_FROM_ALL)
+target_compile_definitions(CppUTest
+  PRIVATE CPPUTEST_MEM_LEAK_DETECTION_DISABLED
+)

This should make CI green, and we'll be ready for merge.

@OMantere
Copy link
Contributor Author

@AlexDenisov Thanks for the change! I applied it in commit 72b7dc0.

Copy link
Member

@AlexDenisov AlexDenisov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@AlexDenisov
Copy link
Member

CI is off again, but I'll fix it separately.

@AlexDenisov AlexDenisov merged commit 981a680 into mull-project:master Sep 18, 2020
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

Successfully merging this pull request may close these issues.

2 participants