|
14 | 14 | parser.add_argument('--tlapm_lib_path', help='Path to the TLA+ proof manager module directory; .tla files should be in this directory', required=True)
|
15 | 15 | parser.add_argument('--community_modules_jar_path', help='Path to the CommunityModules-deps.jar file', required=True)
|
16 | 16 | parser.add_argument('--manifest_path', help='Path to the tlaplus/examples manifest.json file', required=True)
|
| 17 | +parser.add_argument('--skip', nargs='+', help='Space-separated list of models to skip checking', required=False, default=[]) |
| 18 | +parser.add_argument('--only', nargs='+', help='If provided, only check models in this space-separated list', required=False, default=[]) |
17 | 19 | parser.add_argument('--enable_assertions', help='Enable Java assertions (pass -enableassertions to JVM)', action='store_true')
|
18 | 20 | args = parser.parse_args()
|
19 | 21 |
|
|
24 | 26 | community_jar_path = normpath(args.community_modules_jar_path)
|
25 | 27 | manifest_path = normpath(args.manifest_path)
|
26 | 28 | examples_root = dirname(manifest_path)
|
| 29 | +skip_models = args.skip |
| 30 | +only_models = args.only |
27 | 31 | enable_assertions = args.enable_assertions
|
28 | 32 |
|
29 | 33 | def check_model(module, model):
|
@@ -85,11 +89,18 @@ def check_model(module, model):
|
85 | 89 | )
|
86 | 90 | # This model is nondeterministic due to use of the Random module
|
87 | 91 | and model['path'] != 'specifications/SpanningTree/SpanTreeRandom.cfg'
|
| 92 | + # This model generates the same distinct states but order varies |
| 93 | + and model['path'] != 'specifications/ewd998/EWD998ChanTrace.cfg' |
| 94 | + and model['path'] not in skip_models |
| 95 | + and (only_models == [] or model['path'] in only_models) |
88 | 96 | ],
|
89 | 97 | key = lambda m: m[2],
|
90 | 98 | reverse=True
|
91 | 99 | )
|
92 | 100 |
|
| 101 | +for path in skip_models: |
| 102 | + logging.info(f'Skipping {path}') |
| 103 | + |
93 | 104 | for module, model, _ in small_models:
|
94 | 105 | success = check_model(module, model)
|
95 | 106 | if not success:
|
|
0 commit comments