Skip to content
This repository was archived by the owner on May 31, 2025. It is now read-only.

Better naming for roslaunch check test XMLs.#897

Merged
dirk-thomas merged 3 commits intoros:kinetic-develfrom
mikepurvis:improved-roslaunch-check
Sep 16, 2016
Merged

Better naming for roslaunch check test XMLs.#897
dirk-thomas merged 3 commits intoros:kinetic-develfrom
mikepurvis:improved-roslaunch-check

Conversation

@mikepurvis
Copy link
Copy Markdown
Member

Companion to ros/ros#119

Ran: rosrun roslaunch roslaunch-check src/ridgeback/ridgeback_description/launch/description.launch

Which the following to: test_results/ridgeback_description/rosunit-roslaunch_check_launch_description_launch.xml

<testsuite errors="0" failures="1" name="src/ridgeback/ridgeback_description/launch/description.launch" tests="1" time="1"><testcase classname="roslaunch.RoslaunchCheck" name="ridgeback_description_launch_description_launch" status="run" time="1"><failure message="roslaunch check [src/ridgeback/ridgeback_description/launch/description.launch] failed" type="" /><system-out>&lt;![CDATA[
[src/ridgeback/ridgeback_description/launch/description.launch]:
  Invalid &lt;param&gt; tag: Cannot load command parameter [robot_description]: command [/Users/mikepurvis/testing_ws/src/ridgeback/ridgeback_description/scripts/env_run                     /Users/mikepurvis/testing_ws/src/ridgeback/ridgeback_description/urdf/configs/empty                     /opt/ros/indigo/lib/xacro/xacro /Users/mikepurvis/testing_ws/src/ridgeback/ridgeback_description/urdf/ridgeback.urdf.xacro] returned with code [1].

Param xml is &lt;param command="$(find ridgeback_description)/scripts/env_run                     $(find ridgeback_description)/urdf/configs/$(arg config)                     $(find xacro)/xacro $(find ridgeback_description)/urdf/ridgeback.urdf.xacro" name="robot_description"/&gt;
]]&gt;</system-out></testcase></testsuite>

Ran: rosrun roslaunch roslaunch-check src/ridgeback/ridgeback_description/launch

Wrote the following to: test_results/ridgeback_description/rosunit-roslaunch_check_launch.xml

<testsuite errors="0" failures="1" name="src/ridgeback/ridgeback_description/launch" tests="1" time="1"><testcase classname="roslaunch.RoslaunchCheck" name="ridgeback_description_launch" status="run" time="1"><failure message="roslaunch check [src/ridgeback/ridgeback_description/launch] failed" type="" /><system-out>&lt;![CDATA[
[src/ridgeback/ridgeback_description/launch/description.launch]:
  Invalid &lt;param&gt; tag: Cannot load command parameter [robot_description]: command [/Users/mikepurvis/testing_ws/src/ridgeback/ridgeback_description/scripts/env_run                     /Users/mikepurvis/testing_ws/src/ridgeback/ridgeback_description/urdf/configs/empty                     /opt/ros/indigo/lib/xacro/xacro /Users/mikepurvis/testing_ws/src/ridgeback/ridgeback_description/urdf/ridgeback.urdf.xacro] returned with code [1].

Param xml is &lt;param command="$(find ridgeback_description)/scripts/env_run                     $(find ridgeback_description)/urdf/configs/$(arg config)                     $(find xacro)/xacro $(find ridgeback_description)/urdf/ridgeback.urdf.xacro" name="robot_description"/&gt;
]]&gt;</system-out></testcase></testsuite>

Ran catkin_make run_tests_ridgeback_navigation_roslaunch-check

Which wrote the following to test_results/ridgeback_description/roslaunch-check_launch_description.launch.xml

<testsuite errors="0" failures="1" name="roslaunch-check_launch_description.launch.xml" tests="1" time="1"><testcase classname="roslaunch.RoslaunchCheck" name="ridgeback_description_launch_description_launch" status="run" time="1"><failure message="roslaunch check [/Users/mikepurvis/testing_ws/src/ridgeback/ridgeback_description/launch/description.launch] failed" type="" /><system-out>&lt;![CDATA[
[/Users/mikepurvis/testing_ws/src/ridgeback/ridgeback_description/launch/description.launch]:
  Invalid &lt;param&gt; tag: Cannot load command parameter [robot_description]: command [/Users/mikepurvis/testing_ws/src/ridgeback/ridgeback_description/scripts/env_run                     /Users/mikepurvis/testing_ws/src/ridgeback/ridgeback_description/urdf/configs/empty                     /opt/ros/indigo/lib/xacro/xacro /Users/mikepurvis/testing_ws/src/ridgeback/ridgeback_description/urdf/ridgeback.urdf.xacro] returned with code [1].

Param xml is &lt;param command="$(find ridgeback_description)/scripts/env_run                     $(find ridgeback_description)/urdf/configs/$(arg config)                     $(find xacro)/xacro $(find ridgeback_description)/urdf/ridgeback.urdf.xacro" name="robot_description"/&gt;
]]&gt;</system-out></testcase></testsuite>

@mikepurvis
Copy link
Copy Markdown
Member Author

mikepurvis commented Sep 16, 2016

This is what it looks like from within Jenkins:

screen shot 2016-09-15 at 9 18 46 pm

Click on "Test Result" and get this view:

screen shot 2016-09-15 at 9 19 13 pm

Drill down again to here:

screen shot 2016-09-15 at 9 19 25 pm

The URL for the final one is job/<jobname>/NNN/testReport/roslaunch/RoslaunchCheck/, which is obviously a huge improvement.

@mikepurvis
Copy link
Copy Markdown
Member Author

mikepurvis commented Sep 16, 2016

This hasn't addressed the business of stdout capture. That turns out to be trickier than first imagined, as output from other invocations must be captured; would rather get this in for now and worry about that part later/never.

@dirk-thomas
Copy link
Copy Markdown
Member

Since this patch relies on the upcoming API in rosunit can you please add a version dependency on version_gte="1.13.3" in

<run_depend>rosunit</run_depend>
.

@mikepurvis
Copy link
Copy Markdown
Member Author

Added versioned dep.

with open(test_file, 'w') as f:
f.write(rosunit.junitxml.test_success_junit_xml(test_name))
f.write(rosunit.junitxml.test_success_junit_xml(test_name, stdout="",
class_name="roslaunch.RoslaunchCheck", testcase_name="%s_%s" % (pkg, outname)))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you please update this to not pass stdout anymore.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Oh of course. I thought I had already removed it; thanks for the catch. Fixed now.

@dirk-thomas
Copy link
Copy Markdown
Member

Thank you for the PR and iterating on it!

@dirk-thomas dirk-thomas merged commit 13008b9 into ros:kinetic-devel Sep 16, 2016
rsinnet pushed a commit to MisoRobotics/ros_comm that referenced this pull request Jun 19, 2017
* Better naming for roslaunch check test XMLs.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants