This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: more objdir removal in testsuite/lib

I'm checking this in.

This removes a few unneeded uses of 'objdir' from gdb.exp.
There are still more there, and elsewhere in lib, but this is still an

On my branch I redefine standard_output_file to:

    proc standard_output_file {basename} {
        global objdir subdir testfile

        set dir [file join $objdir outputs $subdir $testfile]
        file mkdir $dir
        return [file join $dir $basename]

... and I can run most of the test suite this way.

This has two benefits:

First, it is parallel-safe, because each .exp file's outputs are
confined to its own private directory.  This will let run each .exp file
in parallel if we want; my thought is to leave it up to 'make' rather
than the ad-hoc splitting we use now.

Second, this will let us remove all the subdir Makefiles and 'clean'
rules and whatnot in favor of a simple 'rm -rf outputs'.  Maybe we can
get rid of testsuite/configure as well.


2012-07-12  Tom Tromey  <>

	* lib/gdb.exp (standard_testfile): Don't declare objdir.
	(clean_restart): Likewise.
	(core_find): Use standard_output_file.

Index: lib/gdb.exp
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.212
diff -u -r1.212 gdb.exp
--- lib/gdb.exp	12 Jul 2012 15:09:41 -0000	1.212
+++ lib/gdb.exp	12 Jul 2012 16:33:48 -0000
@@ -3097,7 +3097,7 @@
 proc standard_testfile {args} {
     global gdb_test_file_name
-    global objdir subdir
+    global subdir
     global gdb_test_file_last_vars
     # Outputs.
@@ -3797,7 +3797,6 @@
 # the basename of the binary.
 proc clean_restart { executable } {
     global srcdir
-    global objdir
     global subdir
     set binfile [standard_output_file ${executable}]
@@ -3987,7 +3986,7 @@
     # could have many core files lying around, and it may be difficult to
     # tell which one is ours, so let's run the program in a subdirectory.
     set found 0
-    set coredir "${objdir}/${subdir}/coredir.[getpid]"
+    set coredir [standard_output_file coredir.[getpid]]
     file mkdir $coredir
     catch "system \"(cd ${coredir}; ulimit -c unlimited; ${binfile} ${arg}; true) >/dev/null 2>&1\""
     #      remote_exec host "${binfile}"

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]