| 104 | os.kill(process.pid, signal.SIGTERM) |
| 105 | |
| 106 | def platform_shell(self, shell, appargs, outdir): |
| 107 | # Rather than having to use a physical device (iPhone, iPad, etc), we use |
| 108 | # the iOS Simulator for the test runners in order to ease the job of |
| 109 | # builders and testers. |
| 110 | # At the moment Chromium's iossim tool is being used, which is a wrapper |
| 111 | # around 'simctl' macOS command utility. |
| 112 | iossim = outdir / "iossim -d 'iPhone X' " |
| 113 | |
| 114 | if isinstance(appargs, list): |
| 115 | appargs = ' '.join(map(str, appargs)) |
| 116 | if appargs != "": |
| 117 | iossim = f'{iossim}-c ' |
| 118 | appargs = '\"' + appargs + '\"' |
| 119 | app = outdir / f'{shell}.app' |
| 120 | return f'{iossim}{appargs} {app}' |
| 121 | |
| 122 | # TODO(liviurau): Add documentation with diagrams to describe how context and |
| 123 | # its components gets initialized and eventually teared down and how does it |