[Lldb-commits] [lldb] [lldb-dap] Test gardening, enabling tests and improving doc comments. (PR #140777)
Ebuka Ezike via lldb-commits
lldb-commits at lists.llvm.org
Wed May 21 16:33:41 PDT 2025
================
@@ -1102,3 +1103,28 @@ def is_feature_enabled():
return "%s is not supported on this system." % feature
return skipTestIfFn(is_feature_enabled)
+
+
+def skipIfBinaryToLarge(path: Optional[str], maxSize: int):
+ """Skip the test if a binary is to large.
+
+ We skip this test for debug builds because it takes too long
+ parsing lldb's own debug info. Release builds are fine.
+ Checking the size of the lldb-dap binary seems to be a decent
+ proxy for a quick detection. It should be far less than 1 MB in
+ Release builds.
+ """
+
+ def check_binary_size():
+ if not path or not os.path.exists(path):
+ return "invalid path"
+
+ try:
+ size = os.path.getsize(path)
+ if size <= maxSize:
+ return None
+ return f"binary {path} (size = {size} is to larger than {maxSize}"
+ except:
+ return f"failed to read size of {path}"
+
+ return skipTestIfFn(check_binary_size)
----------------
da-viper wrote:
[build_type.txt](https://github.com/user-attachments/files/20377561/build_type.txt)
I created a patch file with the basic build type. you can adjust it to match the correct build type.
https://github.com/llvm/llvm-project/pull/140777
More information about the lldb-commits
mailing list