]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[gdb/testsuite] Use gdb_remote_download in allow_opencl_tests
authorTom de Vries <tdevries@suse.de>
Thu, 23 Mar 2023 13:54:28 +0000 (14:54 +0100)
committerTom de Vries <tdevries@suse.de>
Thu, 23 Mar 2023 13:54:28 +0000 (14:54 +0100)
commit91ffa03af1cc32515190c3b52d7b964f5abead5f
tree53efc0d0fece7a2977d59b2d1087e59286dfc066
parent5834f36d93cabf1a8bcc7dd7654141aed3d296bc
[gdb/testsuite] Use gdb_remote_download in allow_opencl_tests

Simon reported that doing:
...
$ while make check-parallel TESTS='gdb.opencl/*.exp' -j 100; do true; done
...
could run into:
...
ERROR: remote_download to target of \
  /data/vries/gdb/src/gdb/testsuite/lib/opencl_kernel.cl to opencl_kernel.cl: \
  cp: cannot create regular file 'opencl_kernel.cl': File exists
...

Fix this by using gdb_remote_download (instead of plain remote_download) in
allow_opencl_test, which takes care of:
- downloading to a location which is safe for parallel testing, by
  using standard_output_file, and
- cleaning up the downloaded file, meaning we can remove the corresponding
  "remote_file target delete ${clprogram}" lines in allow_opencl_test.

Tested on x86_64-linux.

Reported-by: Simon Marchi <simon.marchi@efficios.com>
gdb/testsuite/lib/opencl.exp