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

Make roslaunch-check respect if/unless attribute on <include>#998

Merged
dirk-thomas merged 1 commit intolunar-develfrom
fix-993
Apr 28, 2017
Merged

Make roslaunch-check respect if/unless attribute on <include>#998
dirk-thomas merged 1 commit intolunar-develfrom
fix-993

Conversation

@mikepurvis
Copy link
Copy Markdown
Member

As discussed in #993. With the fix removed, the updated test XML fails with:

======================================================================
ERROR: unit.test_roslaunch_depends.test_roslaunch_deps
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/administrator/rocksteady_robot_ws/src/roslaunch/test/unit/test_roslaunch_depends.py", line 157, in test_roslaunch_deps
    base_pkg, file_deps, missing = roslaunch_deps(files, verbose=v)
  File "/home/administrator/rocksteady_robot_ws/src/roslaunch/src/roslaunch/depends.py", line 331, in roslaunch_deps
    rl_file_deps(file_deps, launch_file, verbose)
  File "/home/administrator/rocksteady_robot_ws/src/roslaunch/src/roslaunch/depends.py", line 225, in rl_file_deps
    parse_launch(launch_file, file_deps, verbose)
  File "/home/administrator/rocksteady_robot_ws/src/roslaunch/src/roslaunch/depends.py", line 210, in parse_launch
    _parse_launch(launch_tag.childNodes, launch_file, file_deps, verbose, context)
  File "/home/administrator/rocksteady_robot_ws/src/roslaunch/src/roslaunch/depends.py", line 182, in _parse_launch
    raise RoslaunchDepsException("Cannot load roslaunch include '%s' in '%s'"%(sub_launch_file, launch_file))
RoslaunchDepsException: Cannot load roslaunch include 'does/not/exist.launch' in '/home/administrator/rocksteady_robot_ws/src/roslaunch/resources/example.launch

@mikepurvis
Copy link
Copy Markdown
Member Author

mikepurvis commented Feb 24, 2017

@dirk-thomas Getting a dependency failure here on the Lunar buildfarm:

KeyError: "The cache has no package named 'ros-lunar-rosbuild'"

I'm assuming we should be targeting Lunar with new changes now, and considering Kinetic for backport?


Oh blah, I see that there are a number of broken/missing packages at the moment, including rosbuild: http://repositories.ros.org/status_page/ros_lunar_default.html?q=rosbuild

elif tag.attributes.has_key('unless'):
val = resolve_args(tag.attributes['unless'].value, context)
if convert_value(val, 'bool'):
continue
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.

Another possibility would be moving this logic up a level so that it would also do the right thing on <group> and <node>— not currently the case.

Copy link
Copy Markdown
Member Author

@mikepurvis mikepurvis Feb 25, 2017

Choose a reason for hiding this comment

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

This is what I've done instead in df0dfb8.

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.

Is this block still necessary with _check_ifunless being called at the beginning of the loop?

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— no it isn't, but I forgot to remove it. Fixed now.

Looks like it's still rospack 2.4.0 in the shadow repo, so this isn't going to pass yet.

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.

rospack 2.4.1 has propagated to shadow-fixed already: http://repositories.ros.org/status_page/ros_lunar_default.html?q=rospack

Other jobs have turned green.

@mikepurvis
Copy link
Copy Markdown
Member Author

@dirk-thomas I think this is good to go, the failed tests appear to be unrelated to this change.

@dirk-thomas
Copy link
Copy Markdown
Member

The failing tests might be related to ros/rospack#70. I will retrigger the PR jobs once the new version of rospack has been synced to the testing repo.

@dirk-thomas
Copy link
Copy Markdown
Member

@ros-pull-request-builder retest this please

@mikepurvis
Copy link
Copy Markdown
Member Author

Most recent test got rospack 2.4.1 and ran clean.

elif tag.attributes.has_key('unless'):
if not convert_value(val, 'bool'):
return False
if tag.attributes.has_key('unless'):
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.

Previously if a tag had both - an if as well as an unless attribute the second one wasn't considered. Is there a reason to change this?

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 I suppose not; I'll change it back.

@mikepurvis mikepurvis force-pushed the fix-993 branch 2 times, most recently from 0efa6ca to 83fb7c9 Compare March 10, 2017 19:42
@mikepurvis
Copy link
Copy Markdown
Member Author

@ros/ros_comm-maintainers This should be good to go in. Anyone got thoughts?

@IanTheEngineer
Copy link
Copy Markdown
Contributor

Not a maintainer, but changes look good on my end. Is this a candidate for backporting into Kinetic?

@dirk-thomas
Copy link
Copy Markdown
Member

@mikepurvis Looks good to me 👍

@IanTheEngineer First it will be released into Lunar to give it some soak time. It can be backported if there is a strong need for it, the chance for regressions are low, and it doesn't change API.

@dirk-thomas dirk-thomas merged commit a0f4789 into lunar-devel Apr 28, 2017
@dirk-thomas dirk-thomas deleted the fix-993 branch April 28, 2017 21:18
k-okada added a commit to k-okada/jsk_robot that referenced this pull request Jul 12, 2017
k-okada added a commit to k-okada/jsk_robot that referenced this pull request Jul 12, 2017
k-okada added a commit to furushchev/jsk_robot that referenced this pull request Jul 11, 2018
k-okada added a commit to furushchev/jsk_robot that referenced this pull request Jul 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants