From ca2f2e1ec9131c01b340381f2cbbac2bc5951566 Mon Sep 17 00:00:00 2001 From: Klement Sekera Date: Thu, 23 May 2024 11:19:51 +0200 Subject: tests: more options for decoding pcaps Introduce "none", "all" and "failed" options for --decode-pcaps parameter. Keep "failed" as default to be consistent with current behaviour. Add missing documentation to test/Makefile and passthrough to Makefile. Rationale: running tshark binary takes about 100-150ms and if there are thousands of pcap files, it takes minutes to decode them. This might not be desirable if rerunning the tests repeatedly during development. Type: improvement Change-Id: Ie033521d51d18b9d499b9bc40fe6eff21c94622d Signed-off-by: Klement Sekera --- test/config.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/config.py') diff --git a/test/config.py b/test/config.py index 32cc4cac5fa..e939f188c6c 100644 --- a/test/config.py +++ b/test/config.py @@ -409,10 +409,11 @@ parser.add_argument( "/var/run/user/${uid}/vpp.", ) -default_decode_pcaps = False +default_decode_pcaps = "failed" parser.add_argument( "--decode-pcaps", - action="store_true", + action="store", + choices=["none", "failed", "all"], default=default_decode_pcaps, help=f"if set, decode all pcap files from a test run (default: {default_decode_pcaps})", ) -- cgit