Skip to content

Commit 1b340ac

Browse files
committed
Fixed coverall
1 parent 2adf8f7 commit 1b340ac

2 files changed

Lines changed: 31 additions & 4 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ before_install:
2626
- rm -rf $ROS2WS/src/ros2_java/ros2_java_utils && ln -s $HOME_BUILD/ros2java-alfred/ros2_java_utils $ROS2WS/src/ros2_java/ros2_java_utils
2727
- echo "BUILD ROS2 WS..."
2828
- cd $HOME_BUILD && ls -lFa ./ && find . -maxdepth 3 -type d -not \( -path "./.git" -prune \)
29-
- docker run -u "$UID" -it --rm -v `pwd`:`pwd` -w `pwd` theosakamg7/ros2java:latest sh -c ". ament_ws/install_isolated/local_setup.sh && cd /home/travis/build/ros2_java_ws && ament build --symlink-install --isolated --skip-packages $PKG_EXCLUDE"
29+
- docker run -u "$UID" -it --rm -v `pwd`:`pwd` -e COVERALLS_REPO_TOKEN=$COVERALLS_REPO_TOKEN -w `pwd` theosakamg7/ros2java:latest sh -c ". ament_ws/install_isolated/local_setup.sh && cd /home/travis/build/ros2_java_ws && ament build --symlink-install --isolated --skip-packages $PKG_EXCLUDE"
3030

3131
script:
3232
- cd $HOME_BUILD && docker run -u "$UID" -it --rm -v `pwd`:`pwd` -w `pwd` theosakamg7/ros2java:latest sh -c ". ament_ws/install_isolated/local_setup.sh && cd /home/travis/build/ros2_java_ws && ament test --isolated --only rcljava_utils"

rcljava_utils/src/test/java/com/ros2/rcljava/tool/TestRos2Topics.java

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,12 @@
22

33
import static org.junit.Assert.*;
44

5-
import java.util.ArrayList;
6-
75
import org.junit.After;
86
import org.junit.AfterClass;
97
import org.junit.Before;
108
import org.junit.BeforeClass;
119
import org.junit.Ignore;
1210
import org.junit.Test;
13-
import org.ros2.rcljava.RCLJava;
1411
import org.ros2.rcljava.tool.Ros2Topics;
1512

1613
public class TestRos2Topics {
@@ -38,10 +35,40 @@ public final void testFullUsage() throws InterruptedException {
3835
assertEquals(true, true);
3936
}
4037

38+
@Test
39+
public final void testEcho() throws InterruptedException {
40+
Ros2Topics.main(new String[]{"echo"});
41+
assertEquals(true, true);
42+
}
43+
44+
@Test
45+
public final void testFind() throws InterruptedException {
46+
Ros2Topics.main(new String[]{"find"});
47+
assertEquals(true, true);
48+
}
49+
50+
@Test
51+
public final void testHz() throws InterruptedException {
52+
Ros2Topics.main(new String[]{"hz"});
53+
assertEquals(true, true);
54+
}
55+
4156
@Test
4257
public final void testList() throws InterruptedException {
4358
Ros2Topics.main(new String[]{"list"});
4459
assertEquals(true, true);
4560
}
4661

62+
@Test
63+
public final void testPub() throws InterruptedException {
64+
Ros2Topics.main(new String[]{"pub"});
65+
assertEquals(true, true);
66+
}
67+
68+
@Test
69+
public final void testType() throws InterruptedException {
70+
Ros2Topics.main(new String[]{"type"});
71+
assertEquals(true, true);
72+
}
73+
4774
}

0 commit comments

Comments
 (0)