Is there any way to run only one (or several) cpp unit tests? #35290
Answered
by
yhmo
liorf95
asked this question in
Q&A and General discussion
-
Can I run only one (or several) cpp unit tests? |
Beta Was this translation helpful? Give feedback.
Answered by
yhmo
Aug 6, 2024
Replies: 1 comment 1 reply
-
Milvus cpp code is in this directory: /internal/core Run this command: You will see a subdirectory generated: /internal/core/output/unittest with some binary files, such as "all_tests" Run this binary with gtest filter. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
liorf95
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Milvus cpp code is in this directory: /internal/core
Run this command:
make build-cpp-with-unittest
You will see a subdirectory generated: /internal/core/output/unittest with some binary files, such as "all_tests"
Run this binary with gtest filter.
For example, I want to run a single test case "NormalDistributionTest":
./internal/core/output/unittest/all_tests --gtest_filter='SegmentCoreTest.NormalDistributionTest'