debugedit: skip .debug_types tests if compiler doesn't generate section
authorMark Wielaard <mark@klomp.org>
Fri, 24 Mar 2023 16:32:53 +0000 (17:32 +0100)
committerMark Wielaard <mark@klomp.org>
Fri, 21 Apr 2023 12:43:56 +0000 (14:43 +0200)
Some compilers don't generate a .debug_types section even when compiling
with -fdebug-types-section. Skip testing the .debug_types tests in that
case.

Signed-off-by: Mark Wielaard <mark@klomp.org>
tests/debugedit.at

index 725e68ebd463fa9206e8e13547029f0c2b63f5da..c0fb3430b0689909eeb979db3c9c061f9c470282 100644 (file)
@@ -364,6 +364,7 @@ AT_CLEANUP
 AT_SETUP([debugedit .debug_types objects])
 AT_KEYWORDS([debugtypes] [debugedit])
 DEBUGEDIT_SETUP([-fdebug-types-section -gdwarf-4])
+AT_SKIP_IF([! $READELF -S ./foo.o ./subdir_bar/bar.o ./baz.o | grep -F -q '.debug_types'])
 
 AT_DATA([expout],
 [st1
@@ -401,6 +402,7 @@ AT_CLEANUP
 AT_SETUP([debugedit .debug_types partial])
 AT_KEYWORDS([debugtypes] [debugedit])
 DEBUGEDIT_SETUP([-fdebug-types-section -gdwarf-4])
+AT_SKIP_IF([! $READELF -S ./foobarbaz.part.o | grep -F -q '.debug_types'])
 
 AT_DATA([expout],
 [st1
@@ -430,6 +432,7 @@ AT_CLEANUP
 AT_SETUP([debugedit .debug_types exe])
 AT_KEYWORDS([debugtypes] [debugedit])
 DEBUGEDIT_SETUP([-fdebug-types-section -gdwarf-4])
+AT_SKIP_IF([! $READELF -S ./foobarbaz.exe | grep -F -q '.debug_types'])
 
 AT_DATA([expout],
 [st1
This page took 0.055687 seconds and 5 git commands to generate.