- local env_args
-
- env_args=(
- "BABELTRACE_PYTHON_BT2_NO_TRACEBACK=1" \
- "BABELTRACE_PLUGIN_PATH=${BT_TESTS_BABELTRACE_PLUGIN_PATH}" \
- "LIBBABELTRACE2_PLUGIN_PROVIDER_DIR=${BT_TESTS_PROVIDER_DIR}" \
- "BT_TESTS_DATADIR=${BT_TESTS_DATADIR}" \
- "BT_CTF_TRACES_PATH=${BT_CTF_TRACES_PATH}" \
- "BT_PLUGINS_PATH=${BT_PLUGINS_PATH}" \
- "PYTHONPATH=${BT_TESTS_PYTHONPATH}:${BT_TESTS_SRCDIR}/utils/python"
- )
-
- 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
- env_args+=("PATH=${main_lib_path}:${PATH:-}")
- elif [ "$BT_OS_TYPE" = "darwin" ]; then
- env_args+=("DYLD_LIBRARY_PATH=${main_lib_path}:${DYLD_LIBRARY_PATH:-}")
+ local -x "BABELTRACE_PLUGIN_PATH=${BT_TESTS_BABELTRACE_PLUGIN_PATH}"
+ local -x "LIBBABELTRACE2_PLUGIN_PROVIDER_DIR=${BT_TESTS_PROVIDER_DIR}"
+ local -x "BT_TESTS_DATADIR=${BT_TESTS_DATADIR}"
+ local -x "BT_CTF_TRACES_PATH=${BT_CTF_TRACES_PATH}"
+ local -x "BT_PLUGINS_PATH=${_bt_tests_plugins_path}"
+ local -x "PYTHONPATH=${BT_TESTS_PYTHONPATH}${PYTHONPATH:+:}${PYTHONPATH:-}"
+
+ local -r main_lib_path="${BT_TESTS_BUILDDIR}/../src/lib/.libs"
+
+ # Set the library search path so that the Python 3 interpreter can
+ # load `libbabeltrace2`.
+ if [ "$BT_TESTS_OS_TYPE" = "mingw" ] || [ "$BT_TESTS_OS_TYPE" = "cygwin" ]; then
+ local -x PATH="${main_lib_path}${PATH:+:}${PATH:-}"
+ elif [ "$BT_TESTS_OS_TYPE" = "darwin" ]; then
+ local -x DYLD_LIBRARY_PATH="${main_lib_path}${DYLD_LIBRARY_PATH:+:}${DYLD_LIBRARY_PATH:-}"