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

Embed precise Zephyr version & platform name in sanitycheck output .xml #28113

Closed
abrodkin opened this issue Sep 7, 2020 · 7 comments · Fixed by #29172
Closed

Embed precise Zephyr version & platform name in sanitycheck output .xml #28113

abrodkin opened this issue Sep 7, 2020 · 7 comments · Fixed by #29172
Assignees
Labels
area: Sanitycheck Sanitycheck has been renamed to Twister Enhancement Changes/Updates/Additions to existing features

Comments

@abrodkin
Copy link
Collaborator

abrodkin commented Sep 7, 2020

Currently .xml files produced by the sanitycheck script only have information about tests being executed:

<testsuites>
    <testsuite errors="0" failures="0" name="nsim_em" skipped="0" tests="1" time="1.550905">
        <testcase classname="sample.basic" name="sample.basic.helloworld" time="1.550905" />
    </testsuite>
</testsuites>

This is good but for automatic parsing of those results it might be very convenient to have additional data built-in. In particular:

  1. Version of Zephyr source tree being used
  2. Platform on which tests were run

That suggestion came-up during discussion of test results submission automation here zephyrproject-rtos/test_results#68.

With that new information in place we'll be able to do at least automated verification of PRs with test results:

  • If .xml files were put in the proper folder structure (Zephyr version & platfrorm)
  • If that Zephyr version is at all used for results collection or if the source tree was clean (I guess we don't want results from "dirty" trees with unknown changes).

@maksimmasalski, @hakehuang, @wangnuannuan

@abrodkin abrodkin added Enhancement Changes/Updates/Additions to existing features area: Sanitycheck Sanitycheck has been renamed to Twister labels Sep 7, 2020
@PerMac
Copy link
Member

PerMac commented Sep 28, 2020

Isn't the platform name already included in the testsuite attribute: "name="nsim_em"?

@hakehuang
Copy link
Collaborator

Isn't the platform name already included in the testsuite attribute: "name="nsim_em"?

version is missing

@PerMac
Copy link
Member

PerMac commented Sep 28, 2020

I quickly tried to get some more info about JUnit style XML reports and from what I found it seems that there is no "official" format. I think this page might be useful: https://llg.cubic.org/docs/junit/
I remember that we had a conclusion that JUnit doesn't support some of the attributes required by us (e.g. version).
It seems that we can "abuse" the property attribute, where any name (e.g environment related stuff like version) can be used with a corresponding value.

@abrodkin
Copy link
Collaborator Author

Oh, so what stops us from adding another item called for example "version" for each test similarly to what we already have for the platform?

@PerMac
Copy link
Member

PerMac commented Sep 28, 2020

I guess that nothing stops us. I assume we didn't know that this property attribute can be used? I think we will just have to add a way for the sanitycheck script to know internally which version (or SHA?) of zephyr it is using, as I don't see this info available anywhere during the execution.

@abrodkin
Copy link
Collaborator Author

@PerMac probably not during execution, but at build time we already define BUILD_VERSION, see https://github.com/zephyrproject-rtos/zephyr/blob/master/cmake/git.cmake#L16. Another question now is how to pass it to the sanitycheck script :)

Or given ZEPHYR_BASE is known in the sanitycheck script we may just run git describe in ZEPHYR_BASE and record the output.

@hakehuang
Copy link
Collaborator

add more property is a general requirements for sanityscript output, I suppose we will require more and more properity over time.

@PerMac PerMac self-assigned this Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Sanitycheck Sanitycheck has been renamed to Twister Enhancement Changes/Updates/Additions to existing features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants