Fix: tests: use local typing.py for Python 3.5
[babeltrace.git] / tests / utils / utils.sh
index 937b97e9ef31b108ececc94ee6a6442e864aed5c..e2b730923685828301a158ecbba35a19e3fc1402 100644 (file)
@@ -309,7 +309,7 @@ check_coverage() {
 run_python() {
        local our_pythonpath="${BT_TESTS_SRCDIR}/utils/python"
 
-       if [[ $BT_TESTS_PYTHON_VERSION = 3.4 ]]; then
+       if [[ $BT_TESTS_PYTHON_VERSION =~ 3.[45] ]]; then
                # Add a local directory containing a `typing.py` to `PYTHONPATH` for
                # Python 3.4 which doesn't offer the `typing` module.
                our_pythonpath="$our_pythonpath:${BT_TESTS_SRCDIR}/utils/python/typing"
@@ -419,6 +419,6 @@ gen_mctf_trace() {
        local base_dir="$2"
 
        diag "Running: ${BT_TESTS_PYTHON_BIN} ${BT_TESTS_SRCDIR}/utils/python/mctf.py --base-dir ${base_dir} ${input_file}"
-       "${BT_TESTS_PYTHON_BIN}" "${BT_TESTS_SRCDIR}/utils/python/mctf.py" \
+       run_python "${BT_TESTS_PYTHON_BIN}" "${BT_TESTS_SRCDIR}/utils/python/mctf.py" \
                --base-dir "${base_dir}" "${input_file}"
 }
This page took 0.026504 seconds and 4 git commands to generate.