libcxx: In gdb test detect execute_mi with feature check instead of version check.
The existing version check can lead to test failures on some distribution packages of gdb where not all components of the version number are integers, such as Fedora where gdb.VERSION can be something like "15.2-4.fc41". Fix it by replacing the version check with a feature check. Reviewers: philnik777 Reviewed By: philnik777 Pull Request: https://github.com/llvm/llvm-project/pull/132291
This commit is contained in:
committed by
GitHub
parent
39562de510
commit
a4e6a771a6
@@ -30,7 +30,8 @@ test_failures = 0
|
||||
# we exit.
|
||||
has_run_tests = False
|
||||
|
||||
has_execute_mi = tuple(map(int, gdb.VERSION.split("."))) >= (14, 2)
|
||||
has_execute_mi = getattr(gdb, "execute_mi", None) is not None
|
||||
|
||||
|
||||
class CheckResult(gdb.Command):
|
||||
def __init__(self):
|
||||
|
||||
Reference in New Issue
Block a user