Skip to content

[UR][CTS] Upstream CTS parser #810

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

Merged
merged 4 commits into from
Aug 30, 2023

Conversation

veselypeta
Copy link
Contributor

@veselypeta veselypeta commented Aug 21, 2023

Credit: @martygrant

We had used this parser script to measure the CTS pass rate of each adapter in our internal CI. Since UR holds all the CTS tests it makes sense to upstream it here.

I've modified martin's original parser such that we run conformance test suites individually. Instead of parsing the output from stdout we can use the GTEST_OUTPUT environment variable to specify that GTEST should output it's testing summary into a json file. We can then parse this and summarize the results.

Example output:
image

Copy link
Contributor

@martygrant martygrant left a comment

Choose a reason for hiding this comment

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

Hey Petr this looks good, wasn't able to make changes myself last week. Would this still have the issue around crashed tests? The total number of tests wouldn't be accurate because any failed suites won't produce an output file?

@veselypeta
Copy link
Contributor Author

Would this still have the issue around crashed tests? The total number of tests wouldn't be accurate because any failed suites won't produce an output file?

Yes this is still an issue as you say that the output file is not generate. However I think long-term we shouldn't expect there test suites to fail and obtain an accurate value from all the test suites. See discussion here #817 (comment)

@pbalcer
Copy link
Contributor

pbalcer commented Aug 28, 2023

Would this still have the issue around crashed tests? The total number of tests wouldn't be accurate because any failed suites won't produce an output file?

Yes this is still an issue as you say that the output file is not generate. However I think long-term we shouldn't expect there test suites to fail and obtain an accurate value from all the test suites. See discussion here #817 (comment)

One thing we could do is to first look at the list of gtests in a binary, add them to some set, and remove them if found in the log. When summarizing, we can count the tests that remain in the set as Unknown/Crashed.

@veselypeta
Copy link
Contributor Author

I now use gtest_list_tests to get the test list. If a test suite crashes we just assume that all the tests fail. We could get more granular with this by running each test individually with Popen but I think this is unnecessary.

Example output:
image

@veselypeta veselypeta merged commit 04bd987 into oneapi-src:main Aug 30, 2023
@veselypeta veselypeta deleted the petr/port-ctest-parser branch August 30, 2023 09:41
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.

4 participants