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

inject classname for gtest result files #117

Merged
merged 1 commit into from
Nov 16, 2017
Merged

Conversation

dirk-thomas
Copy link
Contributor

@dirk-thomas dirk-thomas commented Nov 15, 2017

Sadly gtest doesn't offer a way to customize the classname attribute which is used by Jenkins xunit to create the hierarchy. Therefore I chose to modify the generated gtest result files.

Before the gtest results were under the (root) entry with no indication to the package: http://ci.ros2.org/job/ci_linux/3531/testReport/(root)/

After they are under an entry names after the package: http://ci.ros2.org/job/ci_linux/3540/testReport/ament_index_cpp/

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@dirk-thomas dirk-thomas added the in review Waiting for review (Kanban column) label Nov 15, 2017
@dirk-thomas dirk-thomas self-assigned this Nov 15, 2017
Copy link
Contributor

@mikaelarguedas mikaelarguedas left a comment

Choose a reason for hiding this comment

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

code change lgtm, looking forward for green CI with the test results with the new hierarchy

@dirk-thomas
Copy link
Contributor Author

All results reported under (root)/projectroot are coming from CTest directly. That means the relevant xUnit result files are in the package build folder under Testing/<timestamp>. We currently don't touch these result files at all.

gtest itself will also generate a result file, the one you referenced: build/class_loader/test_results/class_loader/class_loader_fviz_test.gtest.xml. The content of that is:

<?xml version="1.0" encoding="UTF-8"?>
<testsuites tests="1" failures="0" disabled="0" errors="0" timestamp="2017-11-15T22:13:34" time="0.001" name="AllTests">
  <testsuite name="FvizTest" tests="1" failures="0" disabled="0" errors="0" time="0.001">
    <testcase name="basic_test" status="run" time="0.001" classname="class_loader.FvizTest" />
  </testsuite>
</testsuites>

The classname attribute has been prepended with the package name class_loader.. Therefore you will find a class_loader item in the main test result page (http://ci.ros2.org/job/ci_linux/3541/testReport/). Without this patch the test was reported under (root)/FvizTest (e.g. http://ci.ros2.org/view/nightly/job/nightly_linux_debug/647/testReport/(root)/FvizTest/).

@mikaelarguedas
Copy link
Contributor

xUnit result files are in the package build folder under Testing/. We currently don't touch these result files at all.

Ok that's the part I missed. Thanks for clarifying

Therefore you will find a class_loader item in the main test result page (http://ci.ros2.org/job/ci_linux/3541/testReport/).

Yeah as it happens quite often recently I was unable to open the class_loader folder on the main page so I looked into the one in (root)/projectroot. Are you able to display http://ci.ros2.org/job/ci_linux/3541/testReport/class_loader/ ?

@dirk-thomas
Copy link
Contributor Author

I get the feeling that the problem is related to follow up builds. I created a separate job and there it works fine again: http://ci.ros2.org/view/All/job/dirk_ci_linux/1/testReport/class_loader/

Maybe Jenkins has a problem to open the test results from previous builds if newer builds have been triggered or are ongoing?

@dirk-thomas dirk-thomas merged commit a8648e8 into master Nov 16, 2017
@dirk-thomas dirk-thomas deleted the gtest_classname branch November 16, 2017 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in review Waiting for review (Kanban column)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants