-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[jsk_tools] Add test_env_hooks.test.
- Loading branch information
Showing
4 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
JSK_TOOLS_PATH=$(rospack find jsk_tools) | ||
if [ "$JSK_TOOLS_PATH" = "/opt/ros/${ROS_DISTRO}/share/jsk_tools" ]; then | ||
source /opt/ros/${ROS_DISTRO}/setup.bash | ||
else | ||
source `catkin locate --shell-verbs` | ||
if [ "$(rospack find jsk_tools)" = "$(catkin locate --install)/share/jsk_tools" ]; then | ||
# for install | ||
source "$(rospack find jsk_tools)"/catkin_env_hook/99.jsk_tools.sh | ||
else | ||
# for devel | ||
cd "$JSK_TOOLS_PATH" && source `catkin locate --devel`/etc/catkin/profile.d/99.jsk_tools.sh | ||
fi | ||
fi | ||
|
||
|
||
ECHO_OUTPUT="$1" | ||
function ip() { | ||
echo "$ECHO_OUTPUT" | ||
} | ||
rossetip > /dev/null 2>&1 | ||
echo $ROS_IP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
JSK_TOOLS_PATH=$(rospack find jsk_tools) | ||
if [ "$JSK_TOOLS_PATH" = "/opt/ros/${ROS_DISTRO}/share/jsk_tools" ]; then | ||
source /opt/ros/${ROS_DISTRO}/setup.bash | ||
else | ||
source `catkin locate --shell-verbs` | ||
if [ "$(rospack find jsk_tools)" = "$(catkin locate --install)/share/jsk_tools" ]; then | ||
# for install | ||
source "$(rospack find jsk_tools)"/catkin_env_hook/99.jsk_tools.sh | ||
else | ||
# for devel | ||
cd "$JSK_TOOLS_PATH" && source `catkin locate --devel`/etc/catkin/profile.d/99.jsk_tools.sh | ||
fi | ||
fi | ||
|
||
rossetmaster "$1" "${2-11311}" > /dev/null 2>&1 | ||
echo $ROS_MASTER_URI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<launch> | ||
|
||
<test test-name="test_rossetip0" | ||
name="test_rossetip0" | ||
pkg="jsk_tools" type="test_stdout.py"> | ||
<!-- testing https://github.com/jsk-ros-pkg/jsk_common/issues/1472 --> | ||
<param name="~command" value="/bin/bash $(find jsk_tools)/test/sh/rossetip.sh | ||
"2: eth33 inet 133.11.216.88/24 brd 133.11.216.255 scope global eth33"" /> | ||
<param name="stdout" value="133.11.216.88" /> | ||
</test> | ||
|
||
<test test-name="test_rossetip1" | ||
name="test_rossetip1" | ||
pkg="jsk_tools" type="test_stdout.py"> | ||
<!-- testing https://github.com/jsk-ros-pkg/jsk_common/issues/1472 --> | ||
<param name="~command" value="/bin/bash $(find jsk_tools)/test/sh/rossetip.sh | ||
"2: lo inet 192.168.96.20/24 brd 192.168.102.255 scope global"" /> | ||
<param name="stdout" value="192.168.96.20" /> | ||
</test> | ||
|
||
<test test-name="test_rossetmaster0" | ||
name="test_rossetmaster0" | ||
pkg="jsk_tools" type="test_stdout.py"> | ||
<param name="~command" value="/bin/bash $(find jsk_tools)/test/sh/rossetmaster.sh localhost" /> | ||
<param name="stdout" value="http://localhost:11311" /> | ||
</test> | ||
|
||
<test test-name="test_rossetmaster1" | ||
name="test_rossetmaster1" | ||
pkg="jsk_tools" type="test_stdout.py"> | ||
<param name="~command" value="/bin/bash $(find jsk_tools)/test/sh/rossetmaster.sh hrp2017v 10017" /> | ||
<param name="stdout" value="http://hrp2017v:10017" /> | ||
</test> | ||
|
||
</launch> |