This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
RFA: testsuite: pass optimization flag in the proper way
- From: Jim Blandy <jimb at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: 18 Nov 2002 22:38:55 -0500
- Subject: RFA: testsuite: pass optimization flag in the proper way
2002-11-18 Jim Blandy <jimb@redhat.com>
* gdb.trace/tfind.exp: Pass '-O1' flag via the 'optimize' option,
rather than as part of the output file name.
Index: gdb/testsuite/gdb.trace/tfind.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.trace/tfind.exp,v
retrieving revision 1.2
diff -c -r1.2 tfind.exp
*** gdb/testsuite/gdb.trace/tfind.exp 6 Mar 2001 08:22:00 -0000 1.2
--- gdb/testsuite/gdb.trace/tfind.exp 19 Nov 2002 02:48:02 -0000
***************
*** 53,60 ****
set testfile "actions"
set srcfile ${testfile}.c
set binfile $objdir/$subdir/$testfile
! if { [gdb_compile "$srcdir/$subdir/$srcfile" "$binfile -O1" \
! executable {debug additional_flags=-w}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
gdb_load $binfile
--- 53,64 ----
set testfile "actions"
set srcfile ${testfile}.c
set binfile $objdir/$subdir/$testfile
!
! # Why do we need to specify '-O1' here? Shouldn't that sort of
! # compilation parameter be under the control of the test framework
! # (the target_list and so on)?
! if { [gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" \
! executable {debug additional_flags=-w optimize=-O1}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
gdb_load $binfile