[clang] [clang][test] Rewrote test to work with lit internal shell syntax (PR #105902)

via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 23 15:54:37 PDT 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 f3a47b9e25e7aca0dc2cd2dec30cedd9aeffaecf...ae8f575067ea7035911053b6994e856538c23c3f clang/test/Modules/compare-file-size.py clang/test/lit.cfg.py
``````````

</details>

<details>
<summary>
View the diff from darker here.
</summary>

``````````diff
--- Modules/compare-file-size.py	2024-08-23 17:23:22.000000 +0000
+++ Modules/compare-file-size.py	2024-08-23 22:54:10.455840 +0000
@@ -1,14 +1,16 @@
 import argparse
 import os
+
 
 def get_file_size(file_path):
     try:
         return os.path.getsize(file_path)
     except:
         print(f"Unable to get file size of {file_path}")
         return None
+
 
 def main():
     parser = argparse.ArgumentParser()
 
     parser.add_argument("file1", type=str)
@@ -16,7 +18,8 @@
 
     args = parser.parse_args()
 
     return get_file_size(args.file1) < get_file_size(args.file2)
 
-if __name__ ==  "__main__":
+
+if __name__ == "__main__":
     main()

``````````

</details>


https://github.com/llvm/llvm-project/pull/105902


More information about the cfe-commits mailing list