Get a unique device name for the current worker. Uses the base device name and appends the port number for uniqueness.
()
| 78 | |
| 79 | |
| 80 | def device_name() -> str: |
| 81 | """ |
| 82 | Get a unique device name for the current worker. |
| 83 | Uses the base device name and appends the port number for uniqueness. |
| 84 | """ |
| 85 | if is_platform_android(): |
| 86 | prefix = 'Android Emulator' |
| 87 | else: |
| 88 | prefix = os.environ['IPHONE_MODEL'] |
| 89 | |
| 90 | worker_info = get_worker_info() |
| 91 | |
| 92 | if worker_info.is_parallel: |
| 93 | port = get_flutter_system_port() if is_platform_android() else get_wda_port() |
| 94 | return f'{prefix} - {port}' |
| 95 | |
| 96 | return prefix |
no test coverage detected