diff options
| author | Phil Sutter <phil@nwl.cc> | 2025-09-03 18:20:42 +0200 |
|---|---|---|
| committer | Phil Sutter <phil@nwl.cc> | 2025-09-11 18:11:53 +0200 |
| commit | 2c10b95fc96239e6ca8a328bb76c93cadafa9318 (patch) | |
| tree | 2d67a791f2e614b750a24cbb07e4dd79d178c4c7 /tests/py/nft-test.py | |
| parent | 48550e8e9359c4a2683e4e53cc413c661800c12a (diff) | |
tests: py: Enable JSON and JSON schema by default
Introduce -J/--disable-json and -S/--no-schema to explicitly disable
them if desired.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'tests/py/nft-test.py')
| -rwxr-xr-x | tests/py/nft-test.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/py/nft-test.py b/tests/py/nft-test.py index 984f2b93..12c6174b 100755 --- a/tests/py/nft-test.py +++ b/tests/py/nft-test.py @@ -1488,7 +1488,11 @@ def main(): parser.add_argument('-j', '--enable-json', action='store_true', dest='enable_json', - help='test JSON functionality as well') + help='test JSON functionality as well (default)') + + parser.add_argument('-J', '--disable-json', action='store_true', + dest='disable_json', + help='Do not test JSON functionality as well') parser.add_argument('-l', '--library', default=None, help='path to libntables.so.1, overrides --host') @@ -1499,7 +1503,11 @@ def main(): parser.add_argument('-s', '--schema', action='store_true', dest='enable_schema', - help='verify json input/output against schema') + help='verify json input/output against schema (default)') + + parser.add_argument('-S', '--no-schema', action='store_true', + dest='disable_schema', + help='Do not verify json input/output against schema') parser.add_argument('-v', '--version', action='version', version='1.0', @@ -1510,8 +1518,8 @@ def main(): debug_option = args.debug need_fix_option = args.need_fix_line force_all_family_option = args.force_all_family - enable_json_option = args.enable_json - enable_json_schema = args.enable_schema + enable_json_option = not args.disable_json + enable_json_schema = not args.disable_json and not args.disable_schema specific_file = False signal.signal(signal.SIGINT, signal_handler) |
