selftests: lib: forwarding: allow tests to not require mz and jq
authorVladimir Oltean <vladimir.oltean@nxp.com>
Fri, 22 Oct 2021 18:43:11 +0000 (21:43 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 24 Oct 2021 12:47:45 +0000 (13:47 +0100)
commit016748961ba52d2d952297b0ba8c430c1584adcc
tree845a2d914b9358fa55806d08af840ce3c91854f7
parent5cdfde49a07f38663c277ddf2e56345ea1706fc2
selftests: lib: forwarding: allow tests to not require mz and jq

These programs are useful, but not all selftests require them.

Additionally, on embedded boards without package management (things like
buildroot), installing mausezahn or jq is not always as trivial as
downloading a package from the web.

So it is actually a bit annoying to require programs that are not used.
Introduce options that can be set by scripts to not enforce these
dependencies. For compatibility, default to "yes".

Cc: Nikolay Aleksandrov <nikolay@nvidia.com>
Cc: Ido Schimmel <idosch@nvidia.com>
Cc: Guillaume Nault <gnault@redhat.com>
Cc: Po-Hsu Lin <po-hsu.lin@canonical.com>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/forwarding/lib.sh