From a4b1461ab286c135ce7bcbcdbd4cf36b30b23647 Mon Sep 17 00:00:00 2001 From: William Woodall Date: Tue, 19 Sep 2023 18:57:02 -0700 Subject: [PATCH] add missing test executable Signed-off-by: William Woodall --- launch/test/launch/argv_echo.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 launch/test/launch/argv_echo.py diff --git a/launch/test/launch/argv_echo.py b/launch/test/launch/argv_echo.py new file mode 100644 index 000000000..ac6b3915c --- /dev/null +++ b/launch/test/launch/argv_echo.py @@ -0,0 +1,28 @@ +# Copyright 2023 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Used from test_execute_process.py and others.""" + + +import sys + + +def print_argv(argv): + joined_args = "', '".join(argv) + print(f"['{joined_args}']") + sys.exit(len(argv)) + + +if __name__ == '__main__': + print_argv(sys.argv)