Debian Codegraph @

doc/SystemTap_Beginners_Guide/testsuite/systemtap.base/cxxclass.exp

raw
1 set test "cxxclass"
2 set ::result_string {main_enter
3 call: 64
4 cons call: 64
5 meth call: 64 24
6 dest call: 42
7 call2: 24
8 cons call2: 24
9 meth call2: 24 40
10 dest call2: 42
11 main_exit}
12
13 set test_flags "additional_flags=-g"
14 set test_flags "$test_flags [sdt_includes]"
15 set test_flags "$test_flags compiler=g++"
16 # ppc64 needs a more restrictive constraint for the probe args
17 if {[regexp "^(x86_64|i.86)$" $::tcl_platform(machine)] == 0} {
18 set test_flags "$test_flags additional_flags=-DSTAP_SDT_ARG_CONSTRAINT=nr"
19 }
20
21 proc dyninst_kfails {index} {
22 # The dyninst runtime isn't multi-arch, it only works on the
23 # native architecture. PR14490.
24 if {! [all_compile_flag_native_p $index]} {
25 setup_kfail 14490 "*-*-*"
26 }
27 }
28
29 for {set i 0} {$i < [all_compile_flags]} {incr i} {
30 set extra_flag [all_compile_flag $i]
31 set extra_name [all_compile_flag_name $i]
32
33 set res [target_compile $srcdir/$subdir/$test.cxx $test.exe executable "$test_flags $extra_flag"]
34 if { $res != "" } {
35 verbose "target_compile failed: $res" 2
36 fail "compiling $extra_name $test.c"
37 untested "$extra_name $test.c compile"
38 continue
39 } else {
40 pass "$extra_name $test.c compile"
41 }
42
43 if {[installtest_p]} {
44 foreach runtime [get_runtime_list] {
45 if {$runtime != ""} {
46 if {[info procs ${runtime}_kfails] ne ""} { ${runtime}_kfails $i }
47 stap_run3 "$test-$extra_name-$runtime" -w \
48 $srcdir/$subdir/$test.stp $test.exe -c ./$test.exe --runtime=$runtime
49 } elseif {[uprobes_p]} {
50 stap_run3 "$test-$extra_name" -w $srcdir/$subdir/$test.stp \
51 $test.exe -c ./$test.exe
52 } else {
53 untested "$test-$extra_name"
54 }
55 }
56 } else {
57 untested "$test-$extra_name"
58 }
59 catch {exec rm -f $test.exe}
60 }