tests: fix Windows support in test_convert_args
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 23 Jul 2019 16:15:08 +0000 (12:15 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 23 Jul 2019 19:34:16 +0000 (15:34 -0400)
Additionnal variables were added to the common case, add them for
Windows too.

Change-Id: I33ec919f305a3d69020ee906e29ce4c2636ae54f
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1750
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
tests/cli/test_convert_args

index ed217e7f9789e2a9bc8e4a2cca4d6cb7a5135081..0afe79ad4f2caf32d6317a8632d951d82ab98bf8 100755 (executable)
@@ -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
This page took 0.024441 seconds and 4 git commands to generate.