Fixing some rosbag test dependency issues
This commit is contained in:
parent
d927a65b61
commit
9e6ca22685
|
@ -10,5 +10,9 @@ set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
|
||||||
|
|
||||||
|
|
||||||
rosbuild_add_pyunit(test/migrate_test.py)
|
rosbuild_add_pyunit(test/migrate_test.py)
|
||||||
rosbuild_add_rostest(test/random_record_play.xml)
|
rosbuild_add_rostest(test/random_record.xml)
|
||||||
|
rosbuild_add_rostest(test/random_play.xml)
|
||||||
|
ADD_DEPENDENCIES(rostest_test_random_play.xml rostest_test_random_record.xml)
|
||||||
|
rosbuild_add_rostest(test/random_play_sim.xml)
|
||||||
|
ADD_DEPENDENCIES(rostest_test_random_play_sim.xml rostest_test_random_record.xml)
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
<launch>
|
||||||
|
<test time-limit="100" test-name="02random_play" pkg="test_rosbag" type="random_play.py" args="54321 10 10.0 1.0 0"/>
|
||||||
|
<test time-limit="100" test-name="03random_play" pkg="test_rosbag" type="random_play.py" args="54321 10 10.0 0.5 0"/>
|
||||||
|
<test time-limit="100" test-name="04random_play" pkg="test_rosbag" type="random_play.py" args="54321 10 10.0 2.0 0"/>
|
||||||
|
</launch>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<launch>
|
||||||
|
<param name="use_sim_time" value="true"/>
|
||||||
|
<test time-limit="100" test-name="05random_play" pkg="test_rosbag" type="random_play.py" args="54321 10 10.0 1.0 1"/>
|
||||||
|
<test time-limit="100" test-name="06random_play" pkg="test_rosbag" type="random_play.py" args="54321 10 10.0 0.5 1"/>
|
||||||
|
<test time-limit="100" test-name="07random_play" pkg="test_rosbag" type="random_play.py" args="54321 10 10.0 2.0 1"/>
|
||||||
|
</launch>
|
|
@ -100,7 +100,6 @@ class RandomRecord(unittest.TestCase):
|
||||||
|
|
||||||
# Keep trying to kill until it's dead instead of blocking on communicate
|
# Keep trying to kill until it's dead instead of blocking on communicate
|
||||||
while (f1.poll() is None):
|
while (f1.poll() is None):
|
||||||
print "Looping?"
|
|
||||||
try:
|
try:
|
||||||
os.kill(f1.pid, signal.SIGKILL)
|
os.kill(f1.pid, signal.SIGKILL)
|
||||||
except:
|
except:
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
<launch>
|
||||||
|
<test time-limit="100" test-name="01random_record" pkg="test_rosbag" type="random_record.py" args="54321 10 10.0"/>
|
||||||
|
</launch>
|
|
@ -1,9 +0,0 @@
|
||||||
<launch>
|
|
||||||
<test time-limit="100" test-name="01random_record" pkg="test_rosbag" type="random_record.py" args="54321 10 10.0"/>
|
|
||||||
<test time-limit="100" test-name="02random_play" pkg="test_rosbag" type="random_play.py" args="54321 10 10.0 1.0 0"/>
|
|
||||||
<test time-limit="100" test-name="03random_play" pkg="test_rosbag" type="random_play.py" args="54321 10 10.0 0.5 0"/>
|
|
||||||
<test time-limit="100" test-name="04random_play" pkg="test_rosbag" type="random_play.py" args="54321 10 10.0 2.0 0"/>
|
|
||||||
<test time-limit="100" test-name="05random_play" pkg="test_rosbag" type="random_play.py" args="54321 10 10.0 1.0 1"/>
|
|
||||||
<test time-limit="100" test-name="06random_play" pkg="test_rosbag" type="random_play.py" args="54321 10 10.0 0.5 1"/>
|
|
||||||
<test time-limit="100" test-name="07random_play" pkg="test_rosbag" type="random_play.py" args="54321 10 10.0 2.0 1"/>
|
|
||||||
</launch>
|
|
|
@ -24,14 +24,19 @@ rosbuild_genmsg()
|
||||||
#target_link_libraries(example ${PROJECT_NAME})
|
#target_link_libraries(example ${PROJECT_NAME})
|
||||||
|
|
||||||
# unit tests
|
# unit tests
|
||||||
rosbuild_download_test_data(http://pr.willowgarage.com/data/rosrecord/rosrecord_rename_test.bag test/rosrecord_rename_test.bag 09c6e106c77b06ed3e836a5280c8a7c2)
|
rosbuild_download_test_data(http://pr.willowgarage.com/data/rosrecord/rosrecord_rename_test.indexed.bag test/rosrecord_rename_test.bag 757ab53c4876d21f6d60b9a3e0efb23e)
|
||||||
rosbuild_download_test_data(http://pr.willowgarage.com/data/test_rosrecord/hello_world.bag test/hello_world.bag 95b2aecfd2069c4acb7a29357c7d9c41)
|
rosbuild_download_test_data(http://pr.willowgarage.com/data/test_rosrecord/hello_world.indexed.bag test/hello_world.bag 10fa1e9a4184ddefb69d74a7d9021fc7)
|
||||||
rosbuild_add_pyunit(test/test_rosrecord_py.py)
|
rosbuild_add_pyunit(test/test_rosrecord_py.py)
|
||||||
#rosbuild_add_rostest(test/rename_test.xml)
|
rosbuild_add_rostest(test/rename_test.xml)
|
||||||
|
|
||||||
rosbuild_add_boost_directories()
|
rosbuild_add_boost_directories()
|
||||||
rosbuild_add_gtest(test/test_recorder_player test/test_recorder_player.cpp)
|
rosbuild_add_gtest(test/test_recorder_player test/test_recorder_player.cpp)
|
||||||
rosbuild_link_boost(test/test_recorder_player system)
|
rosbuild_link_boost(test/test_recorder_player system)
|
||||||
|
|
||||||
# Remove test until we resolve details of making them pass deterministically
|
# Remove test until we resolve details of making them pass deterministically
|
||||||
rosbuild_add_rostest(test/random_record_play.xml)
|
rosbuild_add_rostest(test/random_record.xml)
|
||||||
|
rosbuild_add_rostest(test/random_play.xml)
|
||||||
|
ADD_DEPENDENCIES(rostest_test_random_play.xml rostest_test_random_record.xml)
|
||||||
|
rosbuild_add_rostest(test/random_play_sim.xml)
|
||||||
|
ADD_DEPENDENCIES(rostest_test_random_play_sim.xml rostest_test_random_record.xml)
|
||||||
|
|
||||||
|
|
|
@ -62,6 +62,7 @@ class RandomPlay(unittest.TestCase):
|
||||||
|
|
||||||
# We know this message is coming in after a delay
|
# We know this message is coming in after a delay
|
||||||
nowtime -= self.start
|
nowtime -= self.start
|
||||||
|
|
||||||
if (not self.use_clock):
|
if (not self.use_clock):
|
||||||
nowtime -= rospy.Duration(self.delay)
|
nowtime -= rospy.Duration(self.delay)
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
<launch>
|
||||||
|
<test time-limit="100" test-name="02random_play" pkg="test_rosrecord" type="random_play.py" args="54321 10 10.0 1.0 0"/>
|
||||||
|
<test time-limit="100" test-name="03random_play" pkg="test_rosrecord" type="random_play.py" args="54321 10 10.0 0.5 0"/>
|
||||||
|
<test time-limit="100" test-name="04random_play" pkg="test_rosrecord" type="random_play.py" args="54321 10 10.0 2.0 0"/>
|
||||||
|
</launch>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<launch>
|
||||||
|
<param name="use_sim_time" value="true"/>
|
||||||
|
<test time-limit="100" test-name="05random_play" pkg="test_rosrecord" type="random_play.py" args="54321 10 10.0 1.0 1"/>
|
||||||
|
<test time-limit="100" test-name="06random_play" pkg="test_rosrecord" type="random_play.py" args="54321 10 10.0 0.5 1"/>
|
||||||
|
<test time-limit="100" test-name="07random_play" pkg="test_rosrecord" type="random_play.py" args="54321 10 10.0 2.0 1"/>
|
||||||
|
</launch>
|
|
@ -101,7 +101,6 @@ class RandomRecord(unittest.TestCase):
|
||||||
|
|
||||||
# Keep trying to kill until it's dead instead of blocking on communicate
|
# Keep trying to kill until it's dead instead of blocking on communicate
|
||||||
while (f1.poll() is None):
|
while (f1.poll() is None):
|
||||||
print "Looping?"
|
|
||||||
try:
|
try:
|
||||||
os.kill(f1.pid, signal.SIGKILL)
|
os.kill(f1.pid, signal.SIGKILL)
|
||||||
except:
|
except:
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
<launch>
|
||||||
|
<test time-limit="100" test-name="01random_record" pkg="test_rosrecord" type="random_record.py" args="54321 10 10.0"/>
|
||||||
|
</launch>
|
|
@ -1,9 +0,0 @@
|
||||||
<launch>
|
|
||||||
<test time-limit="100" test-name="01random_record" pkg="test_rosrecord" type="random_record.py" args="54321 10 10.0"/>
|
|
||||||
<test time-limit="100" test-name="02random_play" pkg="test_rosrecord" type="random_play.py" args="54321 10 10.0 1.0 0"/>
|
|
||||||
<test time-limit="100" test-name="03random_play" pkg="test_rosrecord" type="random_play.py" args="54321 10 10.0 0.5 0"/>
|
|
||||||
<test time-limit="100" test-name="04random_play" pkg="test_rosrecord" type="random_play.py" args="54321 10 10.0 2.0 0"/>
|
|
||||||
<test time-limit="100" test-name="05random_play" pkg="test_rosrecord" type="random_play.py" args="54321 10 10.0 1.0 1"/>
|
|
||||||
<test time-limit="100" test-name="06random_play" pkg="test_rosrecord" type="random_play.py" args="54321 10 10.0 0.5 1"/>
|
|
||||||
<test time-limit="100" test-name="07random_play" pkg="test_rosrecord" type="random_play.py" args="54321 10 10.0 2.0 1"/>
|
|
||||||
</launch>
|
|
|
@ -197,6 +197,7 @@ TEST(TestSuite, record_play_latching)
|
||||||
|
|
||||||
int main(int argc, char **argv){
|
int main(int argc, char **argv){
|
||||||
testing::InitGoogleTest(&argc, argv);
|
testing::InitGoogleTest(&argc, argv);
|
||||||
|
ros::init(argc, argv, "test_recorder_player");
|
||||||
return RUN_ALL_TESTS();
|
return RUN_ALL_TESTS();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue