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>
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)
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.
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}"
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
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"
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"
},
).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\\'
)
{"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'
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.
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}")
# 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
# 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
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:-}")
# 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