test: add ros integration test runner script & config

This commit is contained in:
Beat Küng
2023-12-06 13:29:07 +01:00
parent 7c14a63855
commit a954ec4d55
3 changed files with 286 additions and 0 deletions
@@ -376,3 +376,29 @@ class TestRunnerMavsdk(Runner):
"--url", mavlink_connection,
"--speed-factor", str(speed_factor),
case]
class TestRunnerRos(Runner):
def __init__(self,
workspace_dir: str,
log_dir: str,
model: str,
case: str,
verbose: bool,
ros_package_build_dir: str):
super().__init__(log_dir, model, case, verbose)
self.name = "integration_tests"
self.cwd = workspace_dir
self.cmd = "nice"
self.args = ["-17",
os.path.join(
ros_package_build_dir,
"integration_tests"),
"--gtest_filter="+case, "--gtest_color=yes"]
def get_output_line(self) -> Optional[str]:
line = super().get_output_line()
if line is not None:
# colorize assertion failures & errors
if 'Failure' in line or '[ERROR]' in line or '[FATAL]' in line:
line = colorize(line, color.RED)
return line