Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[Hexagon] Add support for on-device unit testing using gtest #11145
[Hexagon] Add support for on-device unit testing using gtest #11145
Changes from 17 commits
cd11d02
31fc623
79c2110
8a2ff6d
a85c333
b4db712
8ec34af
4eb97fd
262dc73
b6b0c4b
273a2dd
8916768
39c2275
d1f1784
32e6dd2
f12efd7
fa19d82
e6222e8
816f3be
3946e23
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part disables Hexagon runtime when building for x86. Please revert this.Nevermind. It was an error on my side. Sorry for the noise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat! looks like gtest supports capturing the stdout to a string that we can return in the ret value across the FFI,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, it looks like stdout redirection is one of the disabled features in the Hexagon SDK gtest version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How so? in that case can we target a generic gtest and then modify to support for Hexagon as we have discussed potentially doing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is that one must set
GTEST_HAS_STREAM_REDIRECTION=0
when compiling gtest for Hexagon which disables theCaptureStdout
function. I believe this would be true even if we used a "stock" gtest version as opposed to the gtest version in the Hexagon SDK.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Darn. @kparzysz-quic any idea why this is disabled for Hexagon? Is there an alternative for us to capture stdout on Hexagon?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know. What happens if we set
GTEST_HAS_STREAM_REDIRECTION=1
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GTest stream redirection relies on dup2(), which does not exist under QuRT.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may be useful: https://google.github.io/googletest/advanced.html#extending-googletest-by-handling-test-events