[RFA] Re: gdb.ada tests broken

Joel Brobecker brobecker@adacore.com
Sat Feb 19 12:36:00 GMT 2005


> It looks like your changes to use separate subdirectories for each test
> has broken separate-objdir testing.  My test runs from this morning
> have:

Oh no, I'm sorry. I thought I had tested my changes with out-of-source
builds. Thanks for letting me know.

> Does the test script need to create the output directory?

Yes, it looks like this would be the best way of fixing the problem.
What do you think of the attached patch?

2004-02-18  Joel Brobecker  <brobecker@adacore.com>

        * gdb.ada/fixed_points.exp: Create compilation object directory
        before running the test.
        * gdb.ada/null_record.exp: Likewise.
        * gdb.ada/packed_array.exp: Likewise.
        * gdb.ada/start.exp: Likewise.

Tested on x86-linux using both approaches: one out-of-source build,
and one in-tree build.

Thanks,
-- 
Joel
-------------- next part --------------
Index: fixed_points.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.ada/fixed_points.exp,v
retrieving revision 1.2
diff -u -p -r1.2 fixed_points.exp
--- fixed_points.exp	3 Feb 2005 03:58:52 -0000	1.2
+++ fixed_points.exp	18 Feb 2005 21:52:11 -0000
@@ -26,6 +26,7 @@ set testfile "${testdir}/fixed_points"
 set srcfile ${srcdir}/${subdir}/${testfile}.adb
 set binfile ${objdir}/${subdir}/${testfile}
 
+file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
Index: null_record.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.ada/null_record.exp,v
retrieving revision 1.5
diff -u -p -r1.5 null_record.exp
--- null_record.exp	3 Feb 2005 03:58:53 -0000	1.5
+++ null_record.exp	18 Feb 2005 21:52:11 -0000
@@ -26,6 +26,7 @@ set testfile "${testdir}/null_record"
 set srcfile ${srcdir}/${subdir}/${testfile}.adb
 set binfile ${objdir}/${subdir}/${testfile}
 
+file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
Index: packed_array.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.ada/packed_array.exp,v
retrieving revision 1.1
diff -u -p -r1.1 packed_array.exp
--- packed_array.exp	15 Feb 2005 15:35:26 -0000	1.1
+++ packed_array.exp	18 Feb 2005 21:52:11 -0000
@@ -26,6 +26,7 @@ set testfile "${testdir}/pa"
 set srcfile ${srcdir}/${subdir}/${testfile}.adb
 set binfile ${objdir}/${subdir}/${testfile}
 
+file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
Index: start.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.ada/start.exp,v
retrieving revision 1.1
diff -u -p -r1.1 start.exp
--- start.exp	9 Feb 2005 19:38:01 -0000	1.1
+++ start.exp	18 Feb 2005 21:52:11 -0000
@@ -26,6 +26,7 @@ set testfile "${testdir}/dummy"
 set srcfile ${srcdir}/${subdir}/${testfile}.adb
 set binfile ${objdir}/${subdir}/${testfile}
 
+file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }


More information about the Gdb-patches mailing list