X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=CONTRIBUTING.adoc;h=d9ddf815e4b858ec522e53fbf6d2aff46146d74c;hb=53cc240b958d74a423d0f22752c080f4e3a986db;hp=416c4bfe42a6f23fc23b5686aaf1f0e8764676f5;hpb=dd22a91fdf79ad39dedb83449b905e7659212b45;p=babeltrace.git diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc index 416c4bfe..d9ddf815 100644 --- a/CONTRIBUTING.adoc +++ b/CONTRIBUTING.adoc @@ -583,6 +583,18 @@ of `+BT_LOG*()+`: `+BT_LIB_LOGF("format string", ...)+`:: Library fatal logging statement. +`+BT_LIB_LOGW_APPEND_CAUSE("format string", ...)+`:: + Library warning logging statement, and unconditional error cause + appending. + +`+BT_LIB_LOGE_APPEND_CAUSE("format string", ...)+`:: + Library error logging statement, and unconditional error cause + appending. + +`+BT_LIB_LOGF_APPEND_CAUSE("format string", ...)+`:: + Library fatal logging statement, and unconditional error cause + appending. + The macros above accept the typical `printf()` conversion specifiers with the following limitations: @@ -701,6 +713,10 @@ The available format specifiers are: |Plugin |`const struct bt_plugin *` +|`r` +|Error cause +|`const struct bt_error_cause *` + |`o` |Object pool |`+struct bt_object_pool *+` @@ -1474,3 +1490,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/ +----