Skip to content

Commit

Permalink
net-test: packetdrill: run_all: extra -v are passed to pktdrill cmd
Browse files Browse the repository at this point in the history
Sometimes, it is useful to have more info from packetdrill which can be
done by passing '-v' parameter to it.

Instead of having to modify run_all.py or run packetdrill manually, it
is now possible to add extra -v, e.g.

  $ run_all.py -lL -vvvv

Signed-off-by: Matthieu Baerts <[email protected]>
  • Loading branch information
matttbe authored and nealcardwell committed Sep 29, 2023
1 parent 55c9293 commit 48d5352
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gtests/net/packetdrill/run_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ def CmdTest(self, path, variant, extra_args=None):
cmd.extend(self.default_args.split())
if extra_args is not None:
cmd.extend(extra_args.split())
if self.args['verbose'] > 1:
cmd.append('-' + 'v' * (self.args['verbose'] - 1))
cmd.append(basename)

return (cmd, execdir, path, variant)
Expand Down Expand Up @@ -261,7 +263,8 @@ def ParseArgs():
help="max number of tests running in parallel")
args.add_argument('-s', '--subdirs', action='store_true')
args.add_argument('-S', '--serialized', action='store_true')
args.add_argument('-v', '--verbose', action='store_true')
args.add_argument('-v', '--verbose', action='count', default=0,
help="can be repeated to run packetdrill with -v")
return vars(args.parse_args())


Expand Down

0 comments on commit 48d5352

Please sign in to comment.