]> sourceware.org Git - systemtap.git/commitdiff
Add a non-optimized test to testsuite/systemtap.base/at_var.exp.
authorRavi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Tue, 26 Jul 2016 16:20:05 +0000 (11:20 -0500)
committerDavid Smith <dsmith@redhat.com>
Tue, 26 Jul 2016 16:20:05 +0000 (11:20 -0500)
* testsuite/systemtap.base/at_var.exp: Add non-optimized test. Also, don't
  bother trying to run the executable if compilation failed.

testsuite/systemtap.base/at_var.exp

index fd681a705513ebbb1825f9009a9664e4852f0738..b85b4da8c76c0c5a8b8534323c3fbc1719199ba8 100644 (file)
@@ -40,10 +40,20 @@ if {! [uretprobes_p]} { untested "$test"; return }
 set res [target_compile ${testpath}/${test}.c ${test} executable "additional_flags=-O2 additional_flags=-g"]
 if { $res != "" } {
     verbose "target_compile failed: $res" 2
-    fail "unable to compile ${test}.c"
+    fail "${test}: unable to compile ${test}.c"
+} else {
+    stap_run3 $test $srcdir/$subdir/$test.stp -c ./${test}
 }
 
-stap_run3 $test $srcdir/$subdir/$test.stp -c ./${test}
+# Test for target program compiled without optimization
+set test_name "${test} (non-optimized)"
+set res [target_compile ${testpath}/${test}.c ${test} executable "additional_flags=-g"]
+if { $res != "" } {
+    verbose "target_compile failed: $res" 2
+    fail "${test_name}: unable to compile ${test}.c"
+} else {
+    stap_run3 $test_name $srcdir/$subdir/$test.stp -c ./${test}
+}
 
 # Cleanup
 if { $verbose == 0 } { catch { exec rm -f $test } }
This page took 0.030859 seconds and 5 git commands to generate.