[clang] [llvm] [clang][MBD] set up module build daemon infrastructure (PR #67562)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 24 01:23:36 PST 2024
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 230c13d59d0843c3b738920b85c341cc78a61fa9...a7729911df5e852ecc8718ddb2882d9b7d0928da clang/utils/kill_process.py clang/test/lit.cfg.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- utils/kill_process.py 2024-01-24 09:10:36.000000 +0000
+++ utils/kill_process.py 2024-01-24 09:23:19.885954 +0000
@@ -5,29 +5,30 @@
import os
import psutil
import signal
import sys
+
def main():
if len(sys.argv) == 1:
sys.stderr.write("Error: no search pattern provided")
sys.exit(1)
search_pattern = sys.argv[1]
- for process in psutil.process_iter(['pid', 'name', 'cmdline']):
- if('clang' in process.info['name']):
+ for process in psutil.process_iter(["pid", "name", "cmdline"]):
+ if "clang" in process.info["name"]:
+ PID = []
+ if search_pattern in " ".join(process.info["cmdline"]):
+ PID.append(process.info["pid"])
- PID = []
- if(search_pattern in ' '.join(process.info['cmdline'])):
- PID.append(process.info['pid'])
+ if len(PID) == 0:
+ return
- if(len(PID) == 0):
- return
-
- if(len(PID) > 1):
+ if len(PID) > 1:
sys.stderr.write("Error: more then one process matches search pattern")
os.kill(PID[0], signal.SIGTERM)
+
if __name__ == "__main__":
main()
``````````
</details>
https://github.com/llvm/llvm-project/pull/67562
More information about the llvm-commits
mailing list