compiler-rt/test/sanitizer_common/ios_commands/iossim_env.py
raw| 1 | #!/usr/bin/env python3 |
| 2 | |
| 3 | import os, sys, subprocess |
| 4 | |
| 5 | |
| 6 | idx = 1 |
| 7 | for arg in sys.argv[1:]: |
| 8 | if not "=" in arg: |
| 9 | break |
| 10 | idx += 1 |
| 11 | (argname, argval) = arg.split("=") |
| 12 | os.environ["SIMCTL_CHILD_" + argname] = argval |
| 13 | |
| 14 | exitcode = subprocess.call(sys.argv[idx:]) |
| 15 | if exitcode > 125: |
| 16 | exitcode = 126 |
| 17 | sys.exit(exitcode) |