binutils-gdb/gdb/testsuite/lib
Andrew Burgess 8d70a9f093 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
2019-12-04 20:33:36 +00:00
..
ada.exp [gdb/testsuite] Fix ada tests with -fPIE/-pie 2019-10-10 11:51:34 +02:00
append_gdb_boards_dir.exp
build-piece.exp
cache.exp
cl_util.c
cl_util.h
compile-support.exp
compiler.c [gdb] Fix more typos in comments (2) 2019-10-26 09:55:32 +02:00
compiler.cc [gdb] Fix more typos in comments (2) 2019-10-26 09:55:32 +02:00
completion-support.exp Add check for readline support to more GDB tab-completion tests. 2019-08-04 14:26:39 -07:00
cp-support.exp
d-support.exp
data-structures.exp
dtrace.exp
dwarf.exp
fortran.exp [gdb/testsuite] Fix gdb.fortran/info-types.exp regexp 2019-08-29 14:43:11 +02:00
future.exp
gdb-guile.exp
gdb-python.exp
gdb-utils.exp Introduce metadata style 2019-10-01 15:12:40 -06:00
gdb.exp gdb/testsuite: Use -J option when compiling Fortran tests 2019-12-04 20:33:36 +00:00
gdbserver-support.exp [gdb/testsuite] Fix gdb_target_cmd 2019-09-19 01:14:19 +02:00
gen-perf-test.exp
go.exp
memory.exp
mi-support.exp [gdb/testsuite] Test skip_libstdcxx_probe_tests in mi-catch-cpp-exceptions.exp 2019-07-25 18:39:31 +02:00
objc.exp
opencl_hostapp.c
opencl_kernel.cl
opencl.exp
pascal.exp [gdb/testsuite] Clean up stale exec in gdb_compile_pascal 2019-08-20 17:18:09 +02:00
pdtrace.in
perftest.exp
prelink-support.exp
prompt.exp
range-stepping-support.exp
read1.c [gdb/testsuite] Work around tcl bug in libsegfault.exp with check-read1 2019-07-30 16:15:46 +02:00
rust-support.exp
selftest-support.exp
set_unbuffered_mode.c
trace-support.exp
tuiterm.exp Make TUI resizing tests more robust 2019-11-12 12:29:14 -07:00
unbuffer_output.c
valgrind.exp