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