diff options
author | Mark Wielaard <mjw@redhat.com> | 2009-03-17 16:58:35 +0100 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2009-03-17 16:58:35 +0100 |
commit | bf33ee46c8fff4d181b7f28521f12175bd32ec77 (patch) | |
tree | 5e0a9e1047af60389eee36da54182b52d3d53ee7 /testsuite/systemtap.base/sdt.exp | |
parent | 524c6f82b0a3c010d0fd6a67b1afcfbf55b789a6 (diff) | |
parent | 30cb532a560ed152b86506b80490e99195970271 (diff) | |
download | systemtap-steved-bf33ee46c8fff4d181b7f28521f12175bd32ec77.tar.gz systemtap-steved-bf33ee46c8fff4d181b7f28521f12175bd32ec77.tar.xz systemtap-steved-bf33ee46c8fff4d181b7f28521f12175bd32ec77.zip |
Merge branch 'master' into pr6866
Resolved conflicts:
runtime/task_finder.c: name vs path.
Diffstat (limited to 'testsuite/systemtap.base/sdt.exp')
-rw-r--r-- | testsuite/systemtap.base/sdt.exp | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/testsuite/systemtap.base/sdt.exp b/testsuite/systemtap.base/sdt.exp new file mode 100644 index 00000000..21b94810 --- /dev/null +++ b/testsuite/systemtap.base/sdt.exp @@ -0,0 +1,64 @@ +set test "sdt" +set ::result_string {1 +1 2 +1 2 3 +1 2 3 4 +1 2 3 4 5 +1 2 3 4 5 6 +1 2 3 4 5 6 7 +1 2 3 4 5 6 7 8 +1 2 3 4 5 6 7 8 9 +1 2 3 4 5 6 7 8 9 10} + +set extra_flags {{""} {additional_flags=-std=gnu89} {additional_flags=-ansi} {additional_flags=-pedantic} {additional_flags=-ansi additional_flags=-pedantic} {additional_flags=-O2} {additional_flags="-O3"}} + +# Iterate extra_flags, trying each with C and C++ +for {set i 0} {$i < [llength $extra_flags]} {incr i} { +set extra_flag [lindex $extra_flags $i] + +# C +set test_flags "additional_flags=-g" +set test_flags "$test_flags additional_flags=-I$srcdir/../includes/sys" +set test_flags "$test_flags additional_flags=-Wall" +set test_flags "$test_flags additional_flags=-Wextra" +set test_flags "$test_flags additional_flags=-Werror" + +set res [target_compile $srcdir/$subdir/$test.c $test.prog executable "$test_flags $extra_flag"] +if { $res != "" } { + verbose "target_compile failed: $res" 2 + fail "compiling $test.c $extra_flag" + return +} else { + pass "compiling $test.c $extra_flag" +} + +if {[installtest_p]} { + stap_run3 "$test $extra_flag" $srcdir/$subdir/$test.stp -c ./$test.prog +} else { + untested "$test $extra_flag" +} + +# C++ +set test_flags "additional_flags=-g" +set test_flags "$test_flags additional_flags=-I$srcdir/../includes/sys" +set test_flags "$test_flags additional_flags=-Wall" +set test_flags "$test_flags additional_flags=-Werror" +set test_flags "$test_flags additional_flags=-x additional_flags=c++" + +set res [target_compile $srcdir/$subdir/$test.c $test.prog executable "$test_flags $extra_flag"] +if { $res != "" } { + verbose "target_compile failed: $res" 2 + fail "compiling $test.c c++ $extra_flag" + return +} else { + pass "compiling $test.c c++ $extra_flag" +} + +if {[installtest_p]} { + stap_run3 "$test c++ $extra_flag" $srcdir/$subdir/$test.stp -c ./$test.prog +} else { + untested "$test c++ $extra_flag" +} +} + +catch {exec rm -f $test.prog} |