From 93ea677ec4bc61966966cc71a67bbbca4125d607 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Wed, 10 Jan 2018 15:31:03 -0800 Subject: [PATCH] Test: Add a plugin check. Add a test for `tshark -G plugins`. Change-Id: I9ddced8ad5c200bd11433c7b30038f83da8d7460 Reviewed-on: https://code.wireshark.org/review/25253 Reviewed-by: Gerald Combs Tested-by: Petri Dish Buildbot Petri-Dish: Gerald Combs Reviewed-by: Anders Broman --- test/suite-clopts.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/suite-clopts.sh b/test/suite-clopts.sh index 3a0b7eda68..eed4c2b46b 100755 --- a/test/suite-clopts.sh +++ b/test/suite-clopts.sh @@ -327,6 +327,18 @@ test_dump_glossary_utf8() { fi } +test_dump_glossary_plugins() { + # We do a similar test in fuzz-test.sh. + $TSHARK -G plugins > /dev/null 2> ./testout.txt + PLUGIN_COUNT=$( grep dissectors ./testout.txt | wc -l ) + if [ $PLUGIN_COUNT -lt 10 ] ; then + test_step_output_print ./testout.txt + test_step_failed "Fewer than 10 dissector plugins found" + else + test_step_ok + fi +} + # check that dumping the glossaries succeeds (at least doesn't crash) # this catches extended value strings without the BASE_EXT_STRING flag # among other problems @@ -335,6 +347,7 @@ clopts_suite_dump_glossaries() { test_step_add "Dumping $glossary glossary" "test_dump_glossary $glossary" test_step_add "Testing $glossary output encoding" "test_dump_glossary_utf8 $glossary" done + test_step_add "Testing plugins" test_dump_glossary_plugins } # check exit status of some basic functions