[commit/obvious/testsuite] environ.exp: compile break.c, break1.c

Michael Elizabeth Chastain mec.gnu@mindspring.com
Thu Dec 18 07:41:00 GMT 2003


This patch updates environ.exp.  environ.exp uses break.c in a
trivial way.  break.c has been broken into two parts so I just
need to compile and link both parts.

environ.exp is enabled only on hppa*-*-hpux*.  It could run on a lot of
other platforms; I tried it on i686-pc-linux-gnu and it worked
perfectly.  Perhaps it should run on all "isnative" platforms.
But that's a different subject.  I've filed a PR.

Testing: I tested this on native hppa2.0w-hp-hpux11.11.

I am committing this as an obvious fix.

Michael C

2003-12-16  Michael Chastain  <mec.gnu@mindspring.com>

	* gdb.base/environ.exp: Handle compiling test case from multiple
	source files.

Index: environ.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/environ.exp,v
retrieving revision 1.2
diff -u -r1.2 environ.exp
--- environ.exp	6 Mar 2001 08:21:50 -0000	1.2
+++ environ.exp	18 Dec 2003 06:57:26 -0000
@@ -1,5 +1,4 @@
-#   Copyright 1997, 1998, 1999 Free Software Foundation, Inc.
-
+# Copyright 1997, 1998, 1999, 2003 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -39,11 +38,19 @@
 
 set testfile "break"
 set srcfile ${testfile}.c
+set srcfile1 ${testfile}1.c
 set binfile ${objdir}/${subdir}/${testfile}
 
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug additional_flags=-w}] != "" } {
+    gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug additional_flags=-w}] != "" } {
+    gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug additional_flags=-w}] != "" } {
+    gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
 }
 
 gdb_exit



More information about the Gdb-patches mailing list