selftests: lib: forwarding: allow tests to not require mz and jq
authorVladimir Oltean <vladimir.oltean@nxp.com>
Sun, 24 Oct 2021 17:17:56 +0000 (20:17 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Oct 2021 11:59:42 +0000 (12:59 +0100)
commitd70b51f2845d4a0352361fd4f9741913a2cf2145
tree35e65e0c0f434c1aa5b45d9991441adb368b2487
parent0faf890fc519a10573472ae6b5c244156cf0bff3
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>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/forwarding/lib.sh