Get a unique device name for the current worker. Uses the base device name and appends the port number for uniqueness.
()
| 41 | |
| 42 | |
| 43 | def iphone_device_name() -> str: |
| 44 | """ |
| 45 | Get a unique device name for the current worker. |
| 46 | Uses the base device name and appends the port number for uniqueness. |
| 47 | """ |
| 48 | prefix = os.getenv('IPHONE_MODEL') or 'iPhone 15 Plus' |
| 49 | worker_info = get_worker_info() |
| 50 | |
| 51 | if worker_info.is_parallel: |
| 52 | port = get_wda_port() |
| 53 | return f'{prefix} - {port}' |
| 54 | |
| 55 | return prefix |
no test coverage detected