[compiler-rt] [compiler-rt][sanitizer_common] Improve handling of env vars for iOS simulator tests (PR #146721)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 2 08:22:43 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r HEAD~1...HEAD compiler-rt/test/sanitizer_common/ios_commands/iossim_env.py compiler-rt/test/sanitizer_common/ios_commands/iossim_run.py compiler-rt/test/sanitizer_common/lit.common.cfg.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- ios_commands/iossim_env.py 2025-07-02 15:01:12.000000 +0000
+++ ios_commands/iossim_env.py 2025-07-02 15:22:14.228978 +0000
@@ -3,15 +3,15 @@
import os, sys, subprocess
idx = 1
for arg in sys.argv[1:]:
- if not "=" in arg:
- break
- idx += 1
- (argname, argval) = arg.split("=", maxsplit=1)
- os.environ["SIMCTL_CHILD_" + argname] = argval
+ if not "=" in arg:
+ break
+ idx += 1
+ (argname, argval) = arg.split("=", maxsplit=1)
+ os.environ["SIMCTL_CHILD_" + argname] = argval
exitcode = subprocess.call(sys.argv[idx:])
if exitcode > 125:
exitcode = 126
sys.exit(exitcode)
--- ios_commands/iossim_run.py 2025-07-02 15:01:12.000000 +0000
+++ ios_commands/iossim_run.py 2025-07-02 15:22:14.256803 +0000
@@ -19,11 +19,11 @@
"LSAN_OPTIONS",
"APPLE_ASAN_INIT_FOR_DLOPEN",
"ASAN_ACTIVATION_OPTIONS",
"MallocNanoZone",
]:
- simctl_version = "SIMCTL_CHILD_" + e
+ simctl_version = "SIMCTL_CHILD_" + e
# iossim_env.py might have already set these using arguments it was given
# (and that we can't see from inside this script). Don't overwrite them!
if e in os.environ and simctl_version not in os.environ:
os.environ[simctl_version] = os.environ[e]
``````````
</details>
https://github.com/llvm/llvm-project/pull/146721
More information about the llvm-commits
mailing list