Skip to content

Commit 67fb50b

Browse files
committed
fix: retest_until_pass 2 times by default
1 parent 30fadf3 commit 67fb50b

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

platform_cli/groups/ros.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,21 @@ def command():
9797
default=False,
9898
help="Should we build before testing?",
9999
)
100+
@click.option(
101+
"--retest-until-pass",
102+
type=int,
103+
default=2,
104+
help="Number of times to retest until pass",
105+
)
100106
@click.argument("args", nargs=-1)
101-
def test(package: str, results_dir: Path, watch: bool, build: bool, args: List[str]):
107+
def test(
108+
package: str,
109+
results_dir: Path,
110+
watch: bool,
111+
build: bool,
112+
retest_until_pass: int,
113+
args: List[str],
114+
):
102115
"""Runs colcon test on all ROS packages"""
103116

104117
env = get_ros_env()
@@ -119,7 +132,7 @@ def command():
119132
"--merge-install",
120133
f"--install-base /opt/greenroom/{env['PLATFORM_MODULE']}",
121134
"--event-handlers console_direct+",
122-
# "--retest-until-pass 10",
135+
f"--retest-until-pass {retest_until_pass}",
123136
'--pytest-args "--verbose"',
124137
args_str_test,
125138
]

0 commit comments

Comments
 (0)