================ @@ -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) ---------------- ashgti wrote:
I tried looking around for this info and I'm not exactly sure how to extra that from the CMake files, do you have any pointers on how that could be done? I see other skips for `debug_info` but I'm not sure what that setting actually represents. https://github.com/llvm/llvm-project/pull/140777 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits