@@ -143,7 +143,7 @@ async def log_stream_task(initial_devices):
143
143
sys .stdout .write (line )
144
144
145
145
146
- async def xcode_test (location , simulator ):
146
+ async def xcode_test (location , simulator , verbose ):
147
147
# Run the test suite on the named simulator
148
148
args = [
149
149
"xcodebuild" ,
@@ -159,6 +159,9 @@ async def xcode_test(location, simulator):
159
159
"-derivedDataPath" ,
160
160
str (location / "DerivedData" ),
161
161
]
162
+ if not verbose :
163
+ args += ["-quiet" ]
164
+
162
165
async with async_process (
163
166
* args ,
164
167
stdout = subprocess .PIPE ,
@@ -254,7 +257,7 @@ def update_plist(testbed_path, args):
254
257
plistlib .dump (info , f )
255
258
256
259
257
- async def run_testbed (simulator : str , args : list [str ]):
260
+ async def run_testbed (simulator : str , args : list [str ], verbose : bool = False ):
258
261
location = Path (__file__ ).parent
259
262
print ("Updating plist..." )
260
263
update_plist (location , args )
@@ -267,7 +270,7 @@ async def run_testbed(simulator: str, args: list[str]):
267
270
try :
268
271
async with asyncio .TaskGroup () as tg :
269
272
tg .create_task (log_stream_task (initial_devices ))
270
- tg .create_task (xcode_test (location , simulator ))
273
+ tg .create_task (xcode_test (location , simulator = simulator , verbose = verbose ))
271
274
except* MySystemExit as e :
272
275
raise SystemExit (* e .exceptions [0 ].args ) from None
273
276
except* subprocess .CalledProcessError as e :
@@ -326,6 +329,11 @@ def main():
326
329
default = "iPhone SE (3rd Generation)" ,
327
330
help = "The name of the simulator to use (default: 'iPhone SE (3rd Generation)')" ,
328
331
)
332
+ run .add_argument (
333
+ "-v" , "--verbose" ,
334
+ action = "store_true" ,
335
+ help = "Enable verbose output" ,
336
+ )
329
337
330
338
try :
331
339
pos = sys .argv .index ("--" )
@@ -359,6 +367,7 @@ def main():
359
367
asyncio .run (
360
368
run_testbed (
361
369
simulator = context .simulator ,
370
+ verbose = context .verbose ,
362
371
args = test_args ,
363
372
)
364
373
)
0 commit comments