binutils-gdb/gdb/testsuite/boards
Tom de Vries 436b5e99c8 [gdb/testsuite] Fix "text file busy" errors with cc-with-tweaks.exp
When using target board cc-with-gdb-index.exp and running tests in parallel,
we run into:
...
gdb compile failed, gdb/contrib/gdb-add-index.sh: line 86: \
  build/gdb/testsuite/gdb.sh: Text file busy
...

The problem is that because of the parallel test run, gdb.sh is created for
every single test-case, and eventually gdb.sh is overwritten while being
executed.

Fix this by creating gdb.sh only once.

Tested on x86_64-linux with target board cc-with-gdb-index.exp, using both a
serial and parallel -j 5 test run.

gdb/testsuite/ChangeLog:

2020-03-06  Tom de Vries  <tdevries@suse.de>

	* lib/gdb.exp (tentative_rename, cached_file): New proc.
	* boards/cc-with-tweaks.exp: Use cached_file to create gdb.sh.
2020-03-06 18:03:01 +01:00
..
cc-with-debug-names.exp
cc-with-dwz-m.exp
cc-with-dwz.exp
cc-with-gdb-index.exp
cc-with-tweaks.exp [gdb/testsuite] Fix "text file busy" errors with cc-with-tweaks.exp 2020-03-06 18:03:01 +01:00
dwarf4-gdb-index.exp
fission-dwp.exp
fission.exp
gdbserver-base.exp
local-board.exp
local-remote-host-native.exp
local-remote-host-notty.exp
local-remote-host.exp
native-extended-gdbserver.exp
native-gdbserver.exp
native-stdio-gdbserver.exp
readnow.exp
remote-gdbserver-on-localhost.exp
remote-stdio-gdbserver.exp
stabs.exp
stdio-gdbserver-base.exp