[llvm] [PPC][lit] Catch and ignore any exception running 'git'. (PR #92020)
via llvm-commits
llvm-commits at lists.llvm.org
Mon May 13 13:03:50 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-powerpc
Author: Will Dietz (dtzSiFive)
<details>
<summary>Changes</summary>
specifically, OSError for difficulties executing
(e.g., no such file or directory).
Fixes building in environment where git isn't available.
---
Full diff: https://github.com/llvm/llvm-project/pull/92020.diff
1 Files Affected:
- (modified) llvm/test/CodeGen/PowerPC/lit.local.cfg (+1-1)
``````````diff
diff --git a/llvm/test/CodeGen/PowerPC/lit.local.cfg b/llvm/test/CodeGen/PowerPC/lit.local.cfg
index 4cc802afef4a0..0cebf1b7b22a3 100644
--- a/llvm/test/CodeGen/PowerPC/lit.local.cfg
+++ b/llvm/test/CodeGen/PowerPC/lit.local.cfg
@@ -9,7 +9,7 @@ def get_revision(repo_path):
cmd = ['git', '-C', repo_path, 'rev-parse', 'HEAD']
try:
return subprocess.run(cmd, stdout=subprocess.PIPE, check=True).stdout.decode()
- except subprocess.CalledProcessError:
+ except:
print("An error occurred retrieving the git revision.")
return None
``````````
</details>
https://github.com/llvm/llvm-project/pull/92020
More information about the llvm-commits
mailing list