integration tests: add --force-color & set in CI

github actions supports color output, but does not report as a tty.
See https://github.com/actions/runner/issues/241.
This commit is contained in:
Beat Küng
2025-04-04 09:12:53 +02:00
parent abb80ae71e
commit 3d6056411f
5 changed files with 15 additions and 4 deletions
+5
View File
@@ -121,6 +121,8 @@ def main() -> NoReturn:
help="choice from valgrind, callgrind, gdb, lldb")
parser.add_argument("--upload", default=False, action='store_true',
help="Upload logs to logs.px4.io")
parser.add_argument("--force-color", default=False, action='store_true',
help="Force colorized output")
parser.add_argument("--verbose", default=False, action='store_true',
help="enable more verbose output")
parser.add_argument("--config-file", help="JSON config file to use",
@@ -134,6 +136,9 @@ def main() -> NoReturn:
"If not provided, it is determined via 'ros2 pkg'")
args = parser.parse_args()
if args.force_color:
logger_helper.force_color = True
ros_package_build_dir = args.px4_ros2_interface_lib_build_dir
if ros_package_build_dir is None:
ros_package_build_dir = lookup_px4_ros2_cpp_build_dir()