tests: rename BT_OS_TYPE to BT_TESTS_OS_TYPE
authorSimon Marchi <simon.marchi@efficios.com>
Tue, 28 Sep 2021 20:43:44 +0000 (16:43 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Tue, 28 Sep 2021 23:22:06 +0000 (19:22 -0400)
Follow the naming scheme used by other testsuite environment variables.

Change-Id: I26dfe20b0c06a9de4d1e4bd1418f15d17ed4477c
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/6455
Reviewed-by: Michael Jeanson <mjeanson@efficios.com>
Tested-by: jenkins <jenkins@lttng.org>
tests/bindings/python/bt2/test_plugin.py
tests/cli/convert/test_convert_args
tests/cli/list-plugins/test_list_plugins
tests/lib/conds/test_conds
tests/plugins/sink.ctf.fs/test_assume_single_trace
tests/plugins/sink.ctf.fs/test_stream_names
tests/plugins/src.ctf.fs/query/test_query_trace_info.py
tests/plugins/src.ctf.fs/test_deterministic_ordering
tests/plugins/src.ctf.lttng-live/test_live
tests/utils/utils.sh

index 80de97a3091c201321f73481172a6539c14fa817..4abf884625da628d60c41e5251a71fcedb81c41e 100644 (file)
@@ -50,7 +50,7 @@ class FindPluginsTestCase(unittest.TestCase):
 
     def test_find_file(self):
         extension = _TEST_PLUGIN_PLUGIN_EXTENSION_BY_OS.get(
-            os.environ['BT_OS_TYPE'], 'so'
+            os.environ['BT_TESTS_OS_TYPE'], 'so'
         )
         plugin_name = 'babeltrace-plugin-utils.{}'.format(extension)
         path = os.path.join(_TEST_PLUGIN_PLUGINS_PATH, 'utils', '.libs', plugin_name)
index 12e41bd04b89721a1b0d176a23fa01eb9f2ef9a7..7ac9843e0b9275d2d5c1bcfd4f2daa57b7731eac 100755 (executable)
@@ -70,7 +70,7 @@ 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
+if [ "$BT_TESTS_OS_TYPE" = "mingw" ]; then
        # Use Windows native paths for comparison because Unix
        # paths are converted by the shell before they are passed
        # to the native babeltrace2 binary.
index 7184aa4656744d854f77f094ab62d9f4564f43c5..3e42d1adc4aec0bc44d2a1e1f896611d37b384ee 100755 (executable)
@@ -34,7 +34,7 @@ ok "$?" "exit code is 0"
 grep --after-context=11 '^this-is-a-plugin:$' "${stdout_file}" > "${grep_stdout_file}"
 ok "$?" "entry for this-is-a-plugin is present"
 
-if [ "$BT_OS_TYPE" = "mingw" ]; then
+if [ "$BT_TESTS_OS_TYPE" = "mingw" ]; then
        platform_plugin_dir=$(cygpath -m "${plugin_dir}")
 else
        platform_plugin_dir="${plugin_dir}"
index 48b4fe75df8b27365e6d7a4bd6ef321066d5b481..851079a4e7aa3876cf9c23404cd42cf448104274 100755 (executable)
@@ -16,7 +16,7 @@ source "$UTILSSH"
 reldir=lib/conds
 export BT_TESTS_LIB_CONDS_TRIGGER_BIN="$BT_TESTS_BUILDDIR/$reldir/conds-triggers"
 
-if [ "$BT_OS_TYPE" = "mingw" ]; then
+if [ "$BT_TESTS_OS_TYPE" = "mingw" ]; then
        BT_TESTS_LIB_CONDS_TRIGGER_BIN="$BT_TESTS_LIB_CONDS_TRIGGER_BIN.exe"
 fi
 
index e8508dc3945869fac51caa45b8ac8957331e9a86..dd84e04474e16d3bf040466b001befbf213747b3 100755 (executable)
@@ -37,7 +37,7 @@ bt_cli "$temp_stdout" "$temp_stderr" \
 ok "$?" "run sink.ctf.fs with assume-single-trace=true"
 
 # Check stdout.
-if [ "$BT_OS_TYPE" = "mingw" ]; then
+if [ "$BT_TESTS_OS_TYPE" = "mingw" ]; then
        echo "Created CTF trace \`$(cygpath -m ${trace_dir})\`." > "$temp_expected_stdout"
 else
        echo "Created CTF trace \`${trace_dir}\`." > "$temp_expected_stdout"
index 03ed4174ce471691f625593e29bc26772ceb4002..a60a1dbf97cd3ecebf0f3256fa36338e4b9ab4f4 100755 (executable)
@@ -39,7 +39,7 @@ bt_cli "$temp_stdout" "$temp_stderr" \
 ok "$?" "run babeltrace"
 
 # Check stdout.
-if [ "$BT_OS_TYPE" = "mingw" ]; then
+if [ "$BT_TESTS_OS_TYPE" = "mingw" ]; then
        echo "Created CTF trace \`$(cygpath -m ${temp_output_dir})\\trace\`." > "$temp_expected_stdout"
 else
        echo "Created CTF trace \`${trace_dir}\`." > "$temp_expected_stdout"
index 71e934f174076242d49962cbecda4154dc44019e..eb8fd25ce8e63638386bed9f6f9cbd96bcd89f54 100644 (file)
@@ -133,7 +133,7 @@ class QueryTraceInfoPortNameTestCase(unittest.TestCase):
             },
         ).query()
 
-        if os.environ['BT_OS_TYPE'] == 'mingw':
+        if os.environ['BT_TESTS_OS_TYPE'] == 'mingw':
             os_stream_path = (
                 '\\tests\\data\\ctf-traces\\intersection\\3eventsintersect\\'
             )
@@ -164,7 +164,7 @@ class QueryTraceInfoPortNameTestCase(unittest.TestCase):
             {"inputs": [os.path.join(test_ctf_traces_path, "succeed", "succeed1")]},
         ).query()
 
-        if os.environ['BT_OS_TYPE'] == 'mingw':
+        if os.environ['BT_TESTS_OS_TYPE'] == 'mingw':
             os_stream_path = '\\tests\\data\\ctf-traces\\succeed\\succeed1\\dummystream'
         else:
             os_stream_path = '/tests/data/ctf-traces/succeed/succeed1/dummystream'
index f832200b6f9796246afb4ab6f83bb2563068ba3f..02a76c20a92581f1ede08c121bcd414746e0e0c2 100755 (executable)
@@ -42,7 +42,7 @@ trace_a_corrupted="${traces_dir}/a-corrupted"
 trace_b_not_corrupted="${traces_dir}/b-not-corrupted"
 trace_c_corrupted="${traces_dir}/c-corrupted"
 
-if [ "$BT_OS_TYPE" = "mingw" ]; then
+if [ "$BT_TESTS_OS_TYPE" = "mingw" ]; then
        # The MSYS2 shell makes a mess trying to convert the Unix-like paths
        # to Windows-like paths, so just disable the automatic conversion and
        # do it by hand.
index bbda1d3620bb137b29cb0650af429231e098ab7b..deee081a2f02fdfb5919f6feb476f52792bb13a7 100755 (executable)
@@ -38,7 +38,7 @@ this_dir_relative="plugins/src.ctf.lttng-live"
 test_data_dir="$BT_TESTS_DATADIR/$this_dir_relative"
 trace_dir="$BT_CTF_TRACES_PATH"
 
-if [ "$BT_OS_TYPE" = "mingw" ]; then
+if [ "$BT_TESTS_OS_TYPE" = "mingw" ]; then
        # Same as the above, but in Windows form (C:\foo\bar) instead of Unix form
        # (/c/foo/bar).
        trace_dir_native=$(cygpath -w "${trace_dir}")
index a6b17dbe17c17edd4a96314334a180148b052974..afdc856bf12ad07881ac962a679ad2226a4ef3f7 100644 (file)
@@ -25,27 +25,27 @@ fi
 # We do a bit of translation to ease our life down the road for comparison.
 # Export it so that called executables can use it.
 # [1] https://en.wikipedia.org/wiki/Uname#Examples
-if [ "x${BT_OS_TYPE:-}" = "x" ]; then
-       BT_OS_TYPE="$(uname -s)"
-       case "$BT_OS_TYPE" in
+if [ "x${BT_TESTS_OS_TYPE:-}" = "x" ]; then
+       BT_TESTS_OS_TYPE="$(uname -s)"
+       case "$BT_TESTS_OS_TYPE" in
        MINGW*)
-               BT_OS_TYPE="mingw"
+               BT_TESTS_OS_TYPE="mingw"
                ;;
        Darwin)
-               BT_OS_TYPE="darwin"
+               BT_TESTS_OS_TYPE="darwin"
                ;;
        Linux)
-               BT_OS_TYPE="linux"
+               BT_TESTS_OS_TYPE="linux"
                ;;
        CYGWIN*)
-               BT_OS_TYPE="cygwin"
+               BT_TESTS_OS_TYPE="cygwin"
                ;;
        *)
-               BT_OS_TYPE="unsupported"
+               BT_TESTS_OS_TYPE="unsupported"
                ;;
        esac
 fi
-export BT_OS_TYPE
+export BT_TESTS_OS_TYPE
 
 # Allow overriding the source and build directories
 if [ "x${BT_TESTS_SRCDIR:-}" = "x" ]; then
@@ -69,7 +69,7 @@ fi
 # Allow overriding the babeltrace2 executables
 if [ "x${BT_TESTS_BT2_BIN:-}" = "x" ]; then
        BT_TESTS_BT2_BIN="$BT_TESTS_BUILDDIR/../src/cli/babeltrace2"
-       if [ "$BT_OS_TYPE" = "mingw" ]; then
+       if [ "$BT_TESTS_OS_TYPE" = "mingw" ]; then
                BT_TESTS_BT2_BIN="${BT_TESTS_BT2_BIN}.exe"
        fi
 fi
@@ -296,9 +296,9 @@ run_python_bt2() {
        local main_lib_path="${BT_TESTS_BUILDDIR}/../src/lib/.libs"
 
        # Set the library search path so the python interpreter can load libbabeltrace2
-       if [ "$BT_OS_TYPE" = "mingw" ] || [ "$BT_OS_TYPE" = "cygwin" ]; then
+       if [ "$BT_TESTS_OS_TYPE" = "mingw" ] || [ "$BT_TESTS_OS_TYPE" = "cygwin" ]; then
                env_args+=("PATH=${main_lib_path}:${PATH:-}")
-       elif [ "$BT_OS_TYPE" = "darwin" ]; then
+       elif [ "$BT_TESTS_OS_TYPE" = "darwin" ]; then
                env_args+=("DYLD_LIBRARY_PATH=${main_lib_path}:${DYLD_LIBRARY_PATH:-}")
        else
                env_args+=("LD_LIBRARY_PATH=${main_lib_path}:${LD_LIBRARY_PATH:-}")
@@ -307,7 +307,7 @@ run_python_bt2() {
        # On Windows, an embedded Python interpreter needs a way to locate the path
        # to it's internal modules, set the prefix from python-config to the
        # PYTHONHOME variable.
-       if [ "$BT_OS_TYPE" = "mingw" ]; then
+       if [ "$BT_TESTS_OS_TYPE" = "mingw" ]; then
                env_args+=("PYTHONHOME=$($BT_TESTS_PYTHON_CONFIG_BIN --prefix)")
        fi
 
This page took 0.029541 seconds and 4 git commands to generate.