Update Python bindings and tests to match the latest API
[babeltrace.git] / tests / bindings / python / bt2 / testall.sh.in
1 #!/bin/sh
2
3 check_coverage() {
4 coverage run $@
5 }
6
7 export BABELTRACE_PYTHON_BT2_NO_TRACEBACK=1
8 export TEST_PLUGIN_PLUGINS_PATH="@abs_top_builddir@/plugins"
9 export BABELTRACE_PLUGIN_PATH="@abs_top_builddir@/plugins/ctf:@abs_top_builddir@/plugins/utils:@abs_top_builddir@/plugins/text"
10 PYTHON_BUILD_DIR="@abs_top_builddir@/bindings/python"
11 BT2_NATIVE_LIBS_DIR="@abs_top_builddir@/bindings/python/bt2/.libs"
12 TESTS_UTILS_PYTHON_DIR="@abs_top_srcdir@/tests/utils/python"
13 TESTRUNNER_PY="@abs_top_srcdir@/tests/utils/python/testrunner.py"
14 THIS_DIR="@abs_top_srcdir@/tests/bindings/python/bt2"
15
16 if test "x$TESTALL_COVERAGE" = "x1"; then
17 EXEC=check_coverage
18 else
19 EXEC="@PYTHON@"
20
21 fi
22
23 PYTHONPATH="$PYTHON_BUILD_DIR:$BT2_NATIVE_LIBS_DIR:$TESTS_UTILS_PYTHON_DIR" \
24 "$EXEC" "$TESTRUNNER_PY" "$THIS_DIR"
25 res=$?
26
27 if test "x$TESTALL_COVERAGE_REPORT" = "x1"; then
28 coverage report -m
29 fi
30
31 if test "x$TESTALL_COVERAGE_HTML" = "x1"; then
32 coverage html
33 fi
34
35 exit $res
This page took 0.029005 seconds and 4 git commands to generate.