summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.mi
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2019-11-27 21:51:35 +0000
committerAndrew Burgess <andrew.burgess@embecosm.com>2019-12-04 20:33:36 +0000
commit8d70a9f0938b9e9efc4fd2eee80cf806b5e97a4a (patch)
tree584e907b844f8dceaab4c3be0c2a6fbe84cb6cb8 /gdb/testsuite/gdb.mi
parent36c8fb93c9d4135ce3c1561f5f3886b1b0bf31f6 (diff)
downloadbinutils-gdb-8d70a9f0938b9e9efc4fd2eee80cf806b5e97a4a.tar.gz
gdb/testsuite: Use -J option when compiling Fortran tests
When compiling Fortran tests (e.g. gdb.fortran/info-modules.exp), the Fotran compile produces .mod files. These files contain details of compiled modules that are then consumed by the compiler when compiling other files that USE a module. Currently the compiler writes the .mod files into its current directory, so for us this turns out to be 'build/gdb/testsuite/'. This means that .mod files can be shared between tests, which seems against the spirit of the GDB testsuite; source files should be compiled fresh for each test. This commit adds the -J option to the compiler flags whenever we compile a Fortran file, this option tells the compiler where to write, and look for, .mod files. After this commit there was one Fortran test that needed fixing, with that fix in place all of the Fortran tests pass again, but now the .mod files are now produced in the per-test output directories. gdb/testsuite/ChangeLog: * lib/gdb.exp (gdb_compile): Add -J compiler option when building Fortran tests. * gdb.mi/mi-fortran-modules.exp: Compile source files in correct order. Change-Id: I99444cf22d80e320093d3f3ed9abb8825f378e0b
Diffstat (limited to 'gdb/testsuite/gdb.mi')
-rw-r--r--gdb/testsuite/gdb.mi/mi-fortran-modules.exp2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.mi/mi-fortran-modules.exp b/gdb/testsuite/gdb.mi/mi-fortran-modules.exp
index 12a81a68695..df48324784b 100644
--- a/gdb/testsuite/gdb.mi/mi-fortran-modules.exp
+++ b/gdb/testsuite/gdb.mi/mi-fortran-modules.exp
@@ -22,7 +22,7 @@ set MIFLAGS "-i=mi"
standard_testfile "mi-fortran-modules.f90" "mi-fortran-modules-2.f90"
if {[prepare_for_testing "failed to prepare" ${testfile} \
- [list $srcfile $srcfile2] {debug f90}]} {
+ [list $srcfile2 $srcfile] {debug f90}]} {
return -1
}