From f826e4000f5a43e2b53c3e58057a0d1e5248ca6b Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Tue, 23 Jul 2019 12:15:08 -0400 Subject: [PATCH] tests: fix Windows support in test_convert_args Additionnal variables were added to the common case, add them for Windows too. Change-Id: I33ec919f305a3d69020ee906e29ce4c2636ae54f Signed-off-by: Michael Jeanson Reviewed-on: https://review.lttng.org/c/babeltrace/+/1750 Reviewed-by: Philippe Proulx --- tests/cli/test_convert_args | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/cli/test_convert_args b/tests/cli/test_convert_args index ed217e7f..0afe79ad 100755 --- a/tests/cli/test_convert_args +++ b/tests/cli/test_convert_args @@ -77,13 +77,17 @@ comment() { echo "### $1 ###" } +path_to_trace="${BT_CTF_TRACES_PATH}/succeed/succeed1" +path_to_trace2="${BT_CTF_TRACES_PATH}/succeed/succeed2" +output_path="/output/path" + if [ "$BT_OS_TYPE" = "mingw" ]; then - path_to_trace="C://path/to/trace" - output_path="C://output/path" -else - path_to_trace="${BT_CTF_TRACES_PATH}/succeed/succeed1" - path_to_trace2="${BT_CTF_TRACES_PATH}/succeed/succeed2" - output_path="/output/path" + # Use Windows native paths for comparison because Unix + # paths are converted by the shell before they are passed + # to the native babeltrace2 binary. + path_to_trace=$(cygpath -m "$path_to_trace") + path_to_trace2=$(cygpath -m "$path_to_trace2") + output_path=$(cygpath -m "$output_path") fi plan_tests 77 -- 2.34.1