| 1 |
set test debugtypes |
| 2 |
|
| 3 |
if {! [installtest_p]} { untested "$test"; return } |
| 4 |
if {! [uprobes_p]} { untested "$test"; return } |
| 5 |
|
| 6 |
# Make sure gcc has support for the '-gdwarf-4 -fdebug-types-section' |
| 7 |
# options, otherwise, there is no point to running this test. |
| 8 |
if {[catch {exec gcc -E -gdwarf-4 -fdebug-types-section - < /dev/null}]} { |
| 9 |
untested "$test (no gcc '-gdwarf-4 -fdebug-types-section' support)" |
| 10 |
return |
| 11 |
} |
| 12 |
|
| 13 |
# Now that we know gcc has support for those options, make sure we |
| 14 |
# handle that debugging section option. |
| 15 |
if {[target_compile $srcdir/$subdir/$test.cxx $test.exe executable \ |
| 16 |
{debug {additional_flags=-gdwarf-4 -fdebug-types-section}}] != ""} { |
| 17 |
fail "compiling $test.cxx" |
| 18 |
return |
| 19 |
} |
| 20 |
pass "compiling $test.cxx" |
| 21 |
|
| 22 |
foreach runtime [get_runtime_list] { |
| 23 |
set testname "compiling $test.stp" |
| 24 |
if {$runtime != ""} { |
| 25 |
set rc [stap_run_batch $srcdir/$subdir/$test.stp --runtime=$runtime] |
| 26 |
lappend testname "($runtime)" |
| 27 |
} else { |
| 28 |
set rc [stap_run_batch $srcdir/$subdir/$test.stp] |
| 29 |
} |
| 30 |
|
| 31 |
if {$rc == 0} { pass $testname } else { fail $testname } |
| 32 |
} |