URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=0ce2cdda8bb4c35444ee91f1e0c82f8ef700682b
Submitter: Anders Broman (a.broman58@xxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
0ce2cdd by Peter Wu (peter@xxxxxxxxxxxxx):
Tests: add minimal pytest support
pytest is a powerful test framework. The initial motivation is to have
much better detailed reporting when a test fails, see for example
https://docs.pytest.org/en/latest/
Additionally, it has full parallelization support at the test level (via
the pytest-xdist plugin) instead of being limited to the suite level
(which currently has to be hard-coded via CMakeLists.txt).
Usage with the build dir in /tmp/wsbuild and src dir in /tmp/wireshark:
export WS_BIN_PATH=/tmp/wsbuild/run
pytest /tmp/wireshark/tests
For parallelization support and verbose printing:
pip install pytest-xdist
pytest -nauto -v /tmp/wireshark/tests
To limit yourself to a case based on a pattern:
pytest -nauto -v /tmp/wireshark/tests -k test_unit_ctest_coverage
Tested on Arch Linux with Python 3.6.5, pytest-3.6.2, xdist-1.22.2.
pytest -n8 finished in 82 seconds while ctest -j8 required 87 seconds.
Change-Id: I832f4dd9f988d6656df795327e81610accf54b9f
Reviewed-on: https://code.wireshark.org/review/28651
Reviewed-by: Gerald Combs <gerald@xxxxxxxxxxxxx>
Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
Actions performed:
from 3d1e302 wmem: make wmem_strsplit behave more like g_strsplit
adds 0ce2cdd Tests: add minimal pytest support
Summary of changes:
test/conftest.py | 34 ++++++++++++++++++++++++++++++++++
test/pytest.ini | 2 ++
test/subprocesstest.py | 17 +++++++++++++----
3 files changed, 49 insertions(+), 4 deletions(-)
create mode 100644 test/conftest.py
create mode 100644 test/pytest.ini