CONTRIBUTING.adoc: add how to run `bt2` tests
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Wed, 3 Jul 2019 15:34:02 +0000 (11:34 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 5 Jul 2019 17:11:32 +0000 (13:11 -0400)
This commit adds a tiny testing section containing an introduction and a
few useful commands to run the `bt2` tests.

Philippe will without a doubt rework this section upon the release of
Babeltrace 2.0. So this commit simply adds commands useful to developers
in the meantime.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: If4be315ddcc09efe9224e42de62c5b01c73ead8f
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1602
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins <jenkins@lttng.org>
CONTRIBUTING.adoc

index 416c4bfe42a6f23fc23b5686aaf1f0e8764676f5..62dd8a9d890d0b2e8685bebedd62e1881cc4d88a 100644 (file)
@@ -1474,3 +1474,33 @@ which originate from the Python interpreter anyway).
 `LIBBABELTRACE2_NO_DLCLOSE=1` makes libbabeltrace2 not close the shared
 libraries (plugins) which it loads. You need this to see the appropriate
 backtrace when Valgrind shows errors.
+
+== Testing
+
+=== Python Bindings
+
+To run all the `bt2` Python package tests use:
+
+----
+$ BT_TESTS_BUILDDIR=/path/to/build/babeltrace/tests \
+       ./tests/bindings/python/bt2/test_python_bt2
+----
+
+To run all the tests in a test module (e.g. `test_event.py`) use:
+
+----
+$ BT_TESTS_BUILDDIR=/path/to/build/babeltrace/tests \
+       ./tests/utils/run_python_bt2 python3 ./tests/utils/python/testrunner.py \
+       -t test_event \
+       ./tests/bindings/python/bt2/
+----
+
+To run a specific test (e.g. `EventTestCase.test_clock_value`) in a test module
+(e.g. `test_event.py`) use:
+
+----
+$ BT_TESTS_BUILDDIR=/path/to/build/babeltrace/tests \
+       ./tests/utils/run_python_bt2 python3 ./tests/utils/python/testrunner.py \
+       -t test_event.EventTestCase.test_clock_value \
+       ./tests/bindings/python/bt2/
+----
This page took 0.025281 seconds and 4 git commands to generate.