aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-09-04 08:56:55 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2009-09-04 08:56:55 +0200
commit4d17b2f6959ed19d8d5d3f2f52e8e539cec980c7 (patch)
treea3db7c2cbb6c0403becfafa9d67b35a5326e81a3 /gcc
parentca96ed43b2666f3552806f84ff1229e76fb042d2 (diff)
downloadgcc-4d17b2f6959ed19d8d5d3f2f52e8e539cec980c7.zip
gcc-4d17b2f6959ed19d8d5d3f2f52e8e539cec980c7.tar.gz
gcc-4d17b2f6959ed19d8d5d3f2f52e8e539cec980c7.tar.bz2
guality.exp: Only run guality tests if a trivial testcase using guality.h compiles and links...
* gcc.dg/guality/guality.exp: Only run guality tests if a trivial testcase using guality.h compiles and links and if a global variable can be verified by gdb. From-SVN: r151410
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gcc.dg/guality/guality.exp26
2 files changed, 31 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 1317b16..f9e2502 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2009-09-03 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.dg/guality/guality.exp: Only run guality tests if a trivial
+ testcase using guality.h compiles and links and if a global variable
+ can be verified by gdb.
+
2009-09-03 Bernd Schmidt <bernd.schmidt@analog.com>
* lib/target-supports.exp (check_effective_target_sync_int_long):
diff --git a/gcc/testsuite/gcc.dg/guality/guality.exp b/gcc/testsuite/gcc.dg/guality/guality.exp
index b151c2e..15a6e5e 100644
--- a/gcc/testsuite/gcc.dg/guality/guality.exp
+++ b/gcc/testsuite/gcc.dg/guality/guality.exp
@@ -2,6 +2,30 @@
load_lib gcc-dg.exp
+proc check_guality {args} {
+ set result [eval check_compile guality_check executable $args "-g -O0"]
+ set lines [lindex $result 0]
+ set output [lindex $result 1]
+ set ret 0
+ if {[string match "" $lines]} {
+ set execout [gcc_load "./$output"]
+ set ret [string match "*1 PASS, 0 FAIL, 0 UNRESOLVED*" $execout]
+ }
+ remote_file build delete $output
+ return $ret
+}
+
dg-init
-gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] ""
+
+if {[check_guality "
+ #include \"$srcdir/$subdir/guality.h\"
+ volatile long int varl = 6;
+ int main (int argc, char *argv\[\])
+ {
+ GUALCHKVAL (varl);
+ return 0;
+ }
+"]} {
+ gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] ""
+}
dg-finish