Skip to content

Commit

Permalink
Skip gdb-debughelpers test if gdb version is too old
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikmascherbauer committed Sep 11, 2024
1 parent fef1f79 commit 3a72900
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions substratevm/mx.substratevm/mx_substratevm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1022,6 +1022,22 @@ def build_debug_test(variant_name, image_name, extra_args):


def _gdbdebughelperstest(native_image, path, with_isolates_only, args):

# ====== check gdb version ======
# gdb-debughelperstest and this tests are designed for gdb 14 and higher with the python API enabled
# if we encounter a version lower than 14, we skip this tests
# TODO: remove when gdb 14 is available
gdb_version = mx.run([
os.environ.get('GDB_BIN', 'gdb'), '--nx', '-q',
'-ex', 'py gdb.execute("quit " + gdb.VERSION.split(".")[0])', # try to get gdb version via python
'-ex', 'quit 0' # fallback gdb exit
]
, nonZeroIsFatal=False)
if gdb_version < 14:
mx.warn(f"Skipping gdb-debughelpers tests (Requires gdb version 14, found gdb version {gdb_version}).")
return
# ===============================

test_proj = mx.dependency('com.oracle.svm.test')
test_source_path = test_proj.source_dirs()[0]
tutorial_proj = mx.dependency('com.oracle.svm.tutorial')
Expand Down

0 comments on commit 3a72900

Please sign in to comment.