aboutsummaryrefslogtreecommitdiffstats
path: root/docbook/wsdg_src
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2019-01-21 15:05:37 +0100
committerPeter Wu <peter@lekensteyn.nl>2019-01-21 16:46:17 +0000
commit0971d204525108ec36760d839613b2fb2eadcaa7 (patch)
treea8e8a765905f812ee10c1b6bf83776a9dd11aa62 /docbook/wsdg_src
parent70d9bfbf33ea35879f091df00a0c35bc6fd146f6 (diff)
test: fail tests when programs are missing
Building only a subset of programs is not a very common situation, it is more likely that some feature was accidentally disabled. For that reason, fail tests by default unless a program is explicitly permitted to be missing. The '-v' test is now dropped from the Travis tests, the sole reason of adding it was to see which tests got (accidentally) skipped. Change-Id: I725f4508541d8ed980e17d69fb7aee1ad2875d73 Reviewed-on: https://code.wireshark.org/review/31660 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'docbook/wsdg_src')
-rw-r--r--docbook/wsdg_src/WSDG_chapter_tests.asciidoc21
1 files changed, 16 insertions, 5 deletions
diff --git a/docbook/wsdg_src/WSDG_chapter_tests.asciidoc b/docbook/wsdg_src/WSDG_chapter_tests.asciidoc
index 624fc87197..921621c8e5 100644
--- a/docbook/wsdg_src/WSDG_chapter_tests.asciidoc
+++ b/docbook/wsdg_src/WSDG_chapter_tests.asciidoc
@@ -64,11 +64,9 @@ Capture tests depend on the permissions of the user running the test
script. We assume that the test user has capture permissions on Windows
and macOS and capture tests are enabled by default on those platforms.
-If the program or feature dependencies of a test are not satisfied, then
-the test will be skipped. For example, if `dumpcap` has not been built
-or if an old version of Libgcrypt is in use, then some capture or
-decryption tests will be skipped while other tests can still run to
-completion.
+If a feature is unavailable, the test will be skipped. For example, if
+an old version of Libgcrypt is in use, then some decryption tests will
+be skipped while other tests can still run to completion.
[[TestsLayout]]
==== Suites, Cases, and Tests
@@ -217,6 +215,19 @@ $ pytest --collect-only
$ pytest --collect-only -k "dfilter and tvb"
----
+The test suite will fail tests when programs are missing. When only a
+subset of programs are built or when some programs are disabled, then
+the test suite can be instructed to skip instead of fail tests:
+
+[source,sh]
+----
+# Run tests when libpcap support is disabled (-DENABLE_PCAP=OFF)
+$ pytest --skip-missing-programs dumpcap,rawshark
+
+# Run tests and ignore all tests with missing program dependencies
+$ pytest --skip-missing-programs all
+----
+
To open a Python debugger (PDB) on failing tests, use the `--pdb` option and
disable parallelism with the `-n0` option: