@@ -125,9 +125,10 @@ def run(self, cwd, args):
125
125
class CPythonVm (AbstractPythonVm ):
126
126
PYTHON_INTERPRETER = "python3"
127
127
128
- def __init__ (self , config_name , options = None , virtualenv = None ):
128
+ def __init__ (self , config_name , options = None , virtualenv = None , no_warmup = False ):
129
129
super (CPythonVm , self ).__init__ (config_name , options )
130
130
self ._virtualenv = virtualenv
131
+ self ._no_warmup = no_warmup
131
132
132
133
@property
133
134
def interpreter (self ):
@@ -138,6 +139,24 @@ def interpreter(self):
138
139
def name (self ):
139
140
return VM_NAME_CPYTHON
140
141
142
+ @staticmethod
143
+ def remove_warmup_runs (args ):
144
+ _args = []
145
+ i = 0
146
+ while i < len (args ):
147
+ arg = args [i ]
148
+ _args .append (arg )
149
+ if arg == '-i' :
150
+ _args .append ('0' )
151
+ i += 1
152
+ i += 1
153
+ return _args
154
+
155
+ def run (self , cwd , args ):
156
+ if self ._no_warmup :
157
+ args = CPythonVm .remove_warmup_runs (args )
158
+ return super (CPythonVm , self ).run (cwd , args )
159
+
141
160
142
161
class PyPyVm (AbstractPythonVm ):
143
162
def __init__ (self , config_name , options = None ):
@@ -321,7 +340,8 @@ def successPatterns(self):
321
340
322
341
def failurePatterns (self ):
323
342
return [
324
- re .compile (r"Exception" )
343
+ # lookahead pattern for when truffle compilation details are enabled in the log
344
+ re .compile (r"^(?!(\[truffle\])).*Exception" )
325
345
]
326
346
327
347
def group (self ):
0 commit comments