-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert retreived path to CMake path for use. #244
Conversation
While working I encountered an error due to mixed CMake and Windows style paths from this package (Example below). With this change the path will be converted to a CMake path as soon as it is validated. ``` CMake Error at cmake/add_launch_test.cmake:67 (if): Syntax error in cmake code at C:/Users/Administrator/jacob_ws/src/ros2/launch/launch_testing_ament_cmake/cmake/add_launch_test.cmake:67 when parsing string c:\Users\Administrator\jacob_ws\install\launch_testing/share/launch_testing/examples/args.test.py Invalid character escape '\U'. Call Stack (most recent call first): cmake/add_launch_test.cmake:105 (parse_launch_test_arguments) CMakeLists.txt:28 (add_launch_test) ``` Signed-off-by: Steven! Ragnarök <steven@nuclearsandwich.com>
Move the conversion into the add_launch_test function so all callers can benefit from it. The conversion must happen before the internal argument parsing macro is called in order to avoid string escape errors on Windows. Signed-off-by: Steven! Ragnarök <steven@nuclearsandwich.com>
0388188
to
37a6404
Compare
The second commit moves the conversion into the add_launch_test function. I tried at first to do it inside the argument parsing macro but the macro invocation itself has errors if the string contains unescaped backslashes at that point. So it has to be just before it is called. |
Just saw this on CI: https://ci.ros2.org/job/ci_windows/6980/testReport/junit/(root)/projectroot/C__J_workspace_ci_windows_ws_install_share_launch_testing_examples_args_test_py/. Could be it a regression related to this patch? |
Actually, this was premature. It looks like #239 which landed on top of this independently reproduces the above error. |
While working I encountered an error due to mixed CMake and Windows
style paths from this package (Example below).
With this change the path will be converted to a CMake path as soon as
it is validated.