diff --git a/libcxx/utils/libcxx/test/features.py b/libcxx/utils/libcxx/test/features.py --- a/libcxx/utils/libcxx/test/features.py +++ b/libcxx/utils/libcxx/test/features.py @@ -195,6 +195,9 @@ # Using the quit command here means that gdb itself exits, not just # the "python <...>" command. test_src = """\ +import sys +if sys.version_info.major < 3: + sys.exit(1) try: gdb.Breakpoint(\"main\").commands=\"foo\" except AttributeError: