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

sanitycheck: Add Zephyr's version as a property to xml reports #29172

Merged
merged 2 commits into from
Oct 26, 2020

Conversation

PerMac
Copy link
Member

@PerMac PerMac commented Oct 13, 2020

This PR adds checking and reporting the version of Zephyr used by sanitycheck (via git describe)

This commit adds posibility to save zephyr version in the xml reports.
It adds 'properties' attribute to testsuite attribute. 'properties'
can contain multiple 'property' attributes. Zephyr version is added
as such 'property'.

Signed-off-by: Maciej Perkowski <[email protected]>
@PerMac PerMac requested a review from nashif as a code owner October 13, 2020 17:20
@github-actions github-actions bot added the area: Sanitycheck Sanitycheck has been renamed to Twister label Oct 13, 2020
@nashif nashif self-assigned this Oct 13, 2020
@PerMac PerMac force-pushed the property_xml_report branch from e861c0d to b8dd30b Compare October 14, 2020 11:17
@PerMac PerMac requested a review from aasthagr as a code owner October 14, 2020 11:17
@PerMac PerMac requested review from abrodkin and galak October 14, 2020 11:51
@PerMac
Copy link
Member Author

PerMac commented Oct 14, 2020

I followed a scheme for junit report shown here: https://llg.cubic.org/docs/junit/ when adding 'properties'

Copy link
Collaborator

@abrodkin abrodkin left a comment

Choose a reason for hiding this comment

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

Thanks! That looks pretty cool now!
Execution of ./scripts/sanitycheck --test tests/subsys/logging/log_immediate/lo gging.log_immediate.clean_output --platform nsim_hs --platform nsim_em gave me the following sanity-out/sanitycheck.xml.

<testsuites>
	<testsuite errors="0" failures="0" name="nsim_hs" skipped="0" tests="1" time="3.599809">
		<properties>
			<property name="version" value="zephyr-v2.4.0-559-gb8dd30b2d6" />
		</properties>
		<testcase classname="nsim_hs:tests/subsys/logging/log_immediate/logging.log_immediate" name="tests/subsys/logging/log_immediate/logging.log_immediate.clean_output" time="3.599809" />
	</testsuite>
	<testsuite errors="0" failures="0" name="nsim_em" skipped="0" tests="1" time="3.685498">
		<properties>
			<property name="version" value="zephyr-v2.4.0-559-gb8dd30b2d6" />
		</properties>
		<testcase classname="nsim_em:tests/subsys/logging/log_immediate/logging.log_immediate" name="tests/subsys/logging/log_immediate/logging.log_immediate.clean_output" time="3.685498" />
	</testsuite>
</testsuites>

My only comment would be to maybe move a platform name from testsute's "name" to the "platfrom" property. But I guess that could be done separately.

scripts/sanitycheck Outdated Show resolved Hide resolved
Adds function checking the version of zephyr, used for reporting

Signed-off-by: Maciej Perkowski <[email protected]>
@PerMac PerMac force-pushed the property_xml_report branch from b8dd30b to 7b5052b Compare October 15, 2020 09:35
@nashif nashif merged commit 060e00d into zephyrproject-rtos:master Oct 26, 2020
@PerMac PerMac deleted the property_xml_report branch July 17, 2023 11:17
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Embed precise Zephyr version & platform name in sanitycheck output .xml
4 participants