@@ -816,6 +816,12 @@ def string_opt_parser(self, name, value):
816
816
return "expected option value"
817
817
setattr (self .scfg , name , value )
818
818
819
+ def multi_string_opt_parser (self , name , value ):
820
+ if name not in self .options_seen :
821
+ self .options_seen .add (name )
822
+ setattr (self .scfg , name , [])
823
+ getattr (self .scfg , name ).append (value )
824
+
819
825
def bool_opt_parser (self , name , value ):
820
826
if name in self .options_seen :
821
827
return "repeated option"
@@ -889,11 +895,12 @@ def write(self, job, partition):
889
895
890
896
891
897
class EqySbyStrategy (EqyStrategy ):
892
- default_scfg = dict (engine = 'smtbmc' , depth = 5 , xprop = True , timeout = None )
898
+ default_scfg = dict (engine = 'smtbmc' , depth = 5 , xprop = True , timeout = None , option = () )
893
899
parse_opt_engine = EqyStrategy .string_opt_parser
894
900
parse_opt_depth = EqyStrategy .int_opt_parser
895
901
parse_opt_xprop = EqyStrategy .bool_opt_parser
896
902
parse_opt_timeout = EqyStrategy .int_opt_parser
903
+ parse_opt_option = EqyStrategy .multi_string_opt_parser
897
904
898
905
def write (self , job , partition ):
899
906
with open (self .path (partition .name , f"{ partition .name } .sby" ), "w" ) as sby_f :
@@ -907,6 +914,9 @@ def write(self, job, partition):
907
914
if self .scfg .timeout :
908
915
print (f"timeout { self .scfg .timeout } " , file = sby_f )
909
916
917
+ for option in self .scfg .option :
918
+ print (option , file = sby_f )
919
+
910
920
print (textwrap .dedent (f"""
911
921
912
922
[engines]
0 commit comments