@@ -165,7 +165,7 @@ def build(features):
165
165
log_run_check (["./scripts/build_mpc_zokrates_test.zsh" ])
166
166
167
167
168
- def test (features , extra_args ):
168
+ def test (features , ci : bool , extra_args ):
169
169
"""
170
170
Run cargo tests and any test cases in the feature list
171
171
@@ -176,6 +176,9 @@ def test(features, extra_args):
176
176
177
177
extra_args: list of str
178
178
extra arguments to pass to cargo
179
+
180
+ ci: bool
181
+ whether to disable some tests b/c of CI limitations
179
182
"""
180
183
181
184
build (features )
@@ -197,7 +200,7 @@ def test(features, extra_args):
197
200
log_run_check (["./scripts/test_datalog.zsh" ])
198
201
199
202
if "zok" in features and "smt" in features :
200
- if "aby" in features :
203
+ if "aby" in features and not ci :
201
204
log_run_check (["python3" , "./scripts/aby_tests/zokrates_test_aby.py" ])
202
205
if "lp" in features :
203
206
log_run_check (["./scripts/test_zok_to_ilp.zsh" ])
@@ -213,7 +216,7 @@ def test(features, extra_args):
213
216
log_run_check (["./scripts/test_zok_to_ilp_pf.zsh" ])
214
217
215
218
if "c" in features :
216
- if "aby" in features :
219
+ if "aby" in features and not ci :
217
220
log_run_check (["python3" , "./scripts/aby_tests/c_test_aby.py" ])
218
221
if "smt" in features :
219
222
log_run_check (["./scripts/test_c_smt.zsh" ])
@@ -362,6 +365,11 @@ def format_sub_process_cmd(r: subprocess.CalledProcessError) -> str:
362
365
parser .add_argument (
363
366
"-l" , "--lint" , action = "store_true" , help = "run `cargo clippy`"
364
367
)
368
+ parser .add_argument (
369
+ "--ci" ,
370
+ action = "store_true" ,
371
+ help = "customize commands for CI, where some things are hard to run" ,
372
+ )
365
373
parser .add_argument (
366
374
"--flamegraph" , action = "store_true" , help = "run `cargo flamegraph`"
367
375
)
@@ -402,7 +410,9 @@ def verify_single_action(args: argparse.Namespace):
402
410
actions = [
403
411
k
404
412
for k , v in vars (args ).items ()
405
- if (type (v ) is bool or k in ["features" , "mode" ]) and bool (v )
413
+ if (type (v ) is bool or k in ["features" , "mode" ])
414
+ and bool (v )
415
+ and k not in ["ci" ]
406
416
]
407
417
if len (actions ) != 1 :
408
418
parser .error (
@@ -443,7 +453,7 @@ def verify_extra_implies_flamegraph_or_test(args: argparse.Namespace):
443
453
build (features )
444
454
445
455
if args .test :
446
- test (features , args .extra )
456
+ test (features , args .ci , args . extra )
447
457
448
458
if args .benchmark :
449
459
benchmark (features )
0 commit comments